Skip to content

Commit

Permalink
Catch any exception during EBS injection (#253)
Browse files Browse the repository at this point in the history
For some reason EBS injection only caught and rethrew with more details CNFEs, this PR widens it to all exceptions (like exceptions caused by the dist cleaner)
  • Loading branch information
Matyrobbrt authored Mar 1, 2025
1 parent 05f882f commit f496f9e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public static void inject(final ModContainer mod, final ModFileScanData scanData

bus.register(Class.forName(ad.clazz().getClassName(), true, layer.getClassLoader()));
}
} catch (ClassNotFoundException e) {
LOGGER.fatal(LOADING, "Failed to load mod class {} for @EventBusSubscriber annotation", ad.clazz(), e);
} catch (Exception e) {
LOGGER.fatal(LOADING, "Failed to register class {} with @EventBusSubscriber annotation", ad.clazz(), e);
throw new RuntimeException(e);
}
}
Expand Down

0 comments on commit f496f9e

Please # to comment.