If this was implicitly called by the JVM, we call NoClassDefFoundError.
If the program explicitly called this, then we throw the ClassNotFoundException.
unless explicit
rv = rs.pop()
cls = @bootstrap.get_initialized_class 'Ljava/lang/NoClassDefFoundError;'
v = new JavaObject rs, cls
method_spec = sig: '<init>(Ljava/lang/Throwable;)V'
rs.push_array([v,v,rv])
cls.method_lookup(rs, method_spec).setup_stack(rs)
), (->
rs.meta_stack().pop()
failure_fn (-> throw e)
)
cls = @bootstrap.get_initialized_class 'Ljava/lang/ClassNotFoundException;'
v = new JavaObject rs, cls
method_spec = sig: '<init>(Ljava/lang/String;)V'
msg = rs.init_string(util.ext_classname type_str)
rs.push_array([v,v,msg])
cls.method_lookup(rs, method_spec).setup_stack(rs)
)
)
return
class root.CustomClassLoader extends ClassLoader