diff options
author | zaaarf <zaaarf@proton.me> | 2023-08-24 01:50:14 +0200 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-08-24 01:50:14 +0200 |
commit | ca13fffd0e356a4a0c73563ff90a145acb5d7706 (patch) | |
tree | 99b87027ece6858339d7da2d8e030d3977ee85e8 /src/main/java/ftbsc/geb/exceptions/MissingInterfaceException.java | |
parent | 17398e89db3b4c505a2a65130baf5cd28e20cc1c (diff) |
feat: proper error handling
Diffstat (limited to 'src/main/java/ftbsc/geb/exceptions/MissingInterfaceException.java')
-rw-r--r-- | src/main/java/ftbsc/geb/exceptions/MissingInterfaceException.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/ftbsc/geb/exceptions/MissingInterfaceException.java b/src/main/java/ftbsc/geb/exceptions/MissingInterfaceException.java new file mode 100644 index 0000000..e792729 --- /dev/null +++ b/src/main/java/ftbsc/geb/exceptions/MissingInterfaceException.java @@ -0,0 +1,17 @@ +package ftbsc.geb.exceptions; + +/** + * Thrown when a parent of a listener method does not implement the + * appropriate interface, + */ +public class MissingInterfaceException extends RuntimeException { + + /** + * The public constructor. + * @param clazz the fully-qualified name of the parent class + * @param method the annotated listener method + */ + public MissingInterfaceException(String clazz, String method) { + super(String.format("The parent of %s::%s does not implement the IListener interface!", clazz, method)); + } +} |