Skip to content

Commit

Permalink
[2.7.0 target] Fixes error not properly being caught (#5798) (#5806)
Browse files Browse the repository at this point in the history
Fixes error not properly being caught (#5798)

Update Utils.java

(cherry picked from commit 6caf20c)
  • Loading branch information
TheLimeGlass authored Jul 27, 2023
1 parent 3d9d0df commit bdfde15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/ch/njol/skript/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public static Class<?>[] getClasses(Plugin plugin, String basePackage, String...
for (String c : classNames) {
try {
classes.add(Class.forName(c, true, plugin.getClass().getClassLoader()));
} catch (ClassNotFoundException ex) {
} catch (ClassNotFoundException | NoClassDefFoundError ex) {
Skript.exception(ex, "Cannot load class " + c);
} catch (ExceptionInInitializerError err) {
Skript.exception(err.getCause(), "class " + c + " generated an exception while loading");
Expand Down

0 comments on commit bdfde15

Please sign in to comment.