beeware / voc

A transpiler that converts Python code into Java bytecode

Home Page:http://beeware.org/voc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exceptions created outside try/catch aren't looked up properly

patiences opened this issue · comments

error = ValueError() 
try:
    raise error 
except ValueError:
    pass 

This piece of code fails with

test_raise_existing_error (tests.structures.test_exception.ExceptionTests) ... java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at python.testdaemon.TestDaemon.main(TestDaemon.java:65)
Caused by: java.lang.NoClassDefFoundError: org/python/exceptions/error
	at python.test.module$import(test.py:6)
	at python.test.main(test.py)
	... 5 more
Caused by: java.lang.ClassNotFoundException: org.python.exceptions.error
	at python.testdaemon.JoinClassLoader.findClass(JoinClassLoader.java:62)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 7 more

FAIL