aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers/HandleStandardException.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lombok/javac/handlers/HandleStandardException.java')
-rw-r--r--src/core/lombok/javac/handlers/HandleStandardException.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/lombok/javac/handlers/HandleStandardException.java b/src/core/lombok/javac/handlers/HandleStandardException.java
index 39913a90..ea1a0c5c 100644
--- a/src/core/lombok/javac/handlers/HandleStandardException.java
+++ b/src/core/lombok/javac/handlers/HandleStandardException.java
@@ -59,6 +59,12 @@ public class HandleStandardException extends JavacAnnotationHandler<StandardExce
return;
}
+ JCClassDecl classDef = (JCClassDecl) typeNode.get();
+ if (classDef.extending == null) {
+ annotationNode.addError("@StandardException requires that you extend a Throwable type");
+ return;
+ }
+
AccessLevel access = annotation.getInstance().access();
if (access == null) access = AccessLevel.PUBLIC;
if (access == AccessLevel.NONE) {