diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2018-11-25 17:59:09 +0200 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2018-11-25 17:59:09 +0200 |
commit | a6eeceddbf1961a28236cde1d56951efbb17339d (patch) | |
tree | 13d5f9bc38033605ea2783c116d9d3723acda753 | |
parent | 769ad8c5dc333d15d0ebb8d5d7da9a70cb306953 (diff) | |
download | pf4j-a6eeceddbf1961a28236cde1d56951efbb17339d.tar.gz pf4j-a6eeceddbf1961a28236cde1d56951efbb17339d.zip |
Resolve #209
-rw-r--r-- | pf4j/src/main/java/org/pf4j/CompoundPluginDescriptorFinder.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pf4j/src/main/java/org/pf4j/CompoundPluginDescriptorFinder.java b/pf4j/src/main/java/org/pf4j/CompoundPluginDescriptorFinder.java index 990b9c0..751ad5e 100644 --- a/pf4j/src/main/java/org/pf4j/CompoundPluginDescriptorFinder.java +++ b/pf4j/src/main/java/org/pf4j/CompoundPluginDescriptorFinder.java @@ -67,9 +67,14 @@ public class CompoundPluginDescriptorFinder implements PluginDescriptorFinder { return pluginDescriptor; } } catch (Exception e) { - // log the exception and continue with the next finder - log.error(e.getMessage(), e); - log.debug("Try to continue with the next finder"); + if (finders.indexOf(finder) == finders.size() - 1) { + // it's the last finder + log.error(e.getMessage(), e); + } else { + // log the exception and continue with the next finder + log.debug(e.getMessage()); + log.debug("Try to continue with the next finder"); + } } } else { log.debug("'{}' is not applicable for plugin '{}'", finder, pluginPath); |