diff options
author | GunoH <GunoH@users.noreply.github.com> | 2020-03-10 16:46:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-10 17:46:44 +0200 |
commit | c10e9bc60caab66143f271a968d1b6a3babb615d (patch) | |
tree | f28bfe59e6058215a43e6daaa33e72a1d7df88b2 | |
parent | 2f8343cfda32e282a9a75f7e83cd6b05b8aea93a (diff) | |
download | pf4j-c10e9bc60caab66143f271a968d1b6a3babb615d.tar.gz pf4j-c10e9bc60caab66143f271a968d1b6a3babb615d.zip |
Improve annotation processor error messages (#370)
-rw-r--r-- | pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java b/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java index 797fe04..a5f82b0 100644 --- a/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java +++ b/pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java @@ -239,11 +239,13 @@ public class ExtensionAnnotationProcessor extends AbstractProcessor { // pickup the first interface if (extensionPointElements.isEmpty() && ignoreExtensionPoint) { if (interfaces.isEmpty()) { - error(extensionElement, "%s is not an extension (it doesn't implement any interface)", extensionElement); + error(extensionElement, "Cannot use %s as extension point with %s compiler arg (it doesn't implement any interface)", + extensionElement, IGNORE_EXTENSION_POINT); } else if (interfaces.size() == 1) { extensionPointElements.add(getElement(interfaces.get(0))); } else { - error(extensionElement, "%s is not an extension (it implements multiple interfaces)", extensionElement); + error(extensionElement, "Cannot use %s as extension point with %s compiler arg (it implements multiple interfaces)", + extensionElement, IGNORE_EXTENSION_POINT); } } } |