Catch and report NoClassDefFoundError in makehandler.
authorFredrik Tolf <fredrik@dolda2000.com>
Thu, 9 Nov 2023 19:15:50 +0000 (20:15 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Thu, 9 Nov 2023 19:15:50 +0000 (20:15 +0100)
src/jagi/fs/JavaHandler.java

index 6579097..79a6bdc 100644 (file)
@@ -34,6 +34,8 @@ public class JavaHandler implements Function<Map<Object, Object>, Map<Object, Ob
            main = mod.code.loadClass("Main");
        } catch(ClassNotFoundException e) {
            throw(new HandlerException(mod.file, "no Main class"));
+       } catch(NoClassDefFoundError e) {
+           throw(new HandlerException(mod.file, "class not found: " + e.getMessage()));
        }
        try {
            Method wmain = main.getDeclaredMethod("wmain", String[].class);