Bug #5630
closedError cause is not set when IllegalStateException is thoron in ActiveSAXSource (Saxon 11)
0%
Description
In net/sf/saxon/resource/ActiveSAXSource.java, when an Exception is cached, an IllegalStateException is throwed. Maybe you can set the cause in the IllegalStateException and not print the exception stack trace.
Instead of:
} catch (Exception x) {
x.printStackTrace();
throw new IllegalStateException();
Do something like:
} catch (Exception x) {
throw new IllegalStateException(x);
Updated by Michael Kay over 2 years ago
- Category set to Diagnostics
- Status changed from New to Resolved
- Assignee set to Michael Kay
- Applies to branch 11, trunk added
- Fix Committed on Branch 11, trunk added
- Platforms Java added
Indeed, that's certainly an improvement. The code was probably added to diagnose some particular problem as a once-off. I'm not sure why we bother catching the fallback exception at all, but there may be a reason (perhaps connected with C#?) so I'll leave it in for safety on the 11.x branch, but take it out for 12.x.
Updated by O'Neil Delpratt almost 2 years ago
- Fixed in Maintenance Release 12.0 added
Bug issue fix applied in the Saxon 12.0 Major Release. Leaving this bug marked as Resolved until fix applied on the Saxon 11 branch.
Updated by O'Neil Delpratt almost 2 years ago
- Fixed in Maintenance Release 11.5 added
Bug applied in the Saxon 11.5 Maintenance release.
Updated by O'Neil Delpratt almost 2 years ago
- Status changed from Resolved to Closed
Please register to edit this issue