Issue1684

classification
Title: PyException wrapper for a Java exception raised directly from Python code doesn't have cause set
Type: Severity: normal
Components: Core Versions: Jython 2.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: doublep, fwierzbicki
Priority: normal Keywords:

Created on 2010-12-08.13:05:04 by doublep, last changed 2013-02-26.17:39:39 by fwierzbicki.

Files
File name Uploaded Description Edit Remove
test.java doublep, 2010-12-08.13:05:03 short example demonstrating the problem
test2.java doublep, 2010-12-09.14:28:18 propagating exception thrown in Java code: here cause is correctly set
Messages
msg6274 (view) Author: (doublep) Date: 2010-12-08.13:05:03
The attached example demonstrates the problem.  I have code that walks exception chain to "the real cause" to find out whether that cause should be reported as a user-level error (real_cause instanceof UserLevelException) or internal application bug.  With exceptions raised from Jython code I cannot do this at the moment.
msg6275 (view) Author: (doublep) Date: 2010-12-09.14:28:18
Actually, when exception is thrown by Java code and is wrapped by PyException for propagation, cause is set correctly.  It seems the problem is there only when a Java exception is raised _directly_ from Python code, as in original example.
History
Date User Action Args
2013-02-26 17:39:39fwierzbickisetpriority: normal
nosy: + fwierzbicki
2013-02-19 23:28:05fwierzbickisetversions: + Jython 2.5, - 2.5.1
2010-12-09 14:28:18doublepsetfiles: + test2.java
messages: + msg6275
title: PyException raised from a Java exception doesn't have cause set -> PyException wrapper for a Java exception raised directly from Python code doesn't have cause set
2010-12-08 13:05:04doublepcreate