diff --git a/loader/src/main/java/net/neoforged/fml/javafmlmod/AutomaticEventSubscriber.java b/loader/src/main/java/net/neoforged/fml/javafmlmod/AutomaticEventSubscriber.java index ee4ed9a83..a02562b46 100644 --- a/loader/src/main/java/net/neoforged/fml/javafmlmod/AutomaticEventSubscriber.java +++ b/loader/src/main/java/net/neoforged/fml/javafmlmod/AutomaticEventSubscriber.java @@ -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); } }