Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JiBX 1.1.6
-
Fix Version/s: JiBX 1.2.1
-
Component/s: core
-
Labels:None
-
Number of attachments :
Description
JiBXException has its own mechanism for dealing with nested exceptions. However, when running in JDK 5 and if outer most exception class is not JiBXException (e.g. org.apache.maven.plugin.MojoExecutionException) only partial stack trace is printed. This impedes investigations of bad binding files as in many cases root cause exception is not printed.
This is due to printStackTraceAsCause method implementation in Throwable class.
One way to fix is to implement getCause() method as following:
public Throwable getCause()
{ return getRootCause(); }this way printStackTraceAsCause will honour the root cause that JiBXException contains.
Activity
Dennis Sosnoski
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Dennis Sosnoski [ dsosnoski ] |
Dennis Sosnoski
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | JiBX 1.2.1 [ 15067 ] | |
| Resolution | Fixed [ 1 ] |
Dennis Sosnoski
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
Thanks for the recommendation, I'll give the change a try.
The reason JiBX has its own chaining technique is because it is preserving compatibility with older JDKs. As long as we can continue to do that, changes to make it work better with later JDKs are great.