-
Notifications
You must be signed in to change notification settings - Fork 200
Open
Labels
questionQuestion on how to use JPypeQuestion on how to use JPype
Description
Thanks again for the project!
I have some code to wrap exceptions and send them to parent (python) process. For jpype, I had to add this because JException cannot be serialized:
def wrap_into_traceback(e: BaseException, trim: int = 0) -> traceback.TracebackException:
...
if isinstance(e, JException):
e = RuntimeError(f"{e.message()}\nTraceback:\n{e.stacktrace()}")This works most of the time except raising from startJVM(jvmpath="does-not-exist"). Trying to reproduce this in a minimal code, I see this error as OSError: [Errno 0] JVM DLL not found but in the production example it segfaults raises unhandled JPypeException on isinstance (fortunately, can see the traceback). Not sure how to debug this.
terminate called after throwing an instance of 'JPypeException'
Fatal Python error: Aborted
...
Current thread 0x00007f42b216a740 (most recent call first):
File "/home/pulkin/.../something.py", line 87 in wrap_into_tracebackMetadata
Metadata
Assignees
Labels
questionQuestion on how to use JPypeQuestion on how to use JPype