Project

Profile

Help

Bug #5630

closed

Error cause is not set when IllegalStateException is thoron in ActiveSAXSource (Saxon 11)

Added by Octavian Nadolu over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2022-08-03
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
11, trunk
Fix Committed on Branch:
11, trunk
Fixed in Maintenance Release:
Platforms:
Java

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);
 
Actions #1

Updated by Michael Kay over 1 year 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.

Actions #2

Updated by O'Neil Delpratt over 1 year 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.

Actions #3

Updated by O'Neil Delpratt about 1 year ago

  • Fixed in Maintenance Release 11.5 added

Bug applied in the Saxon 11.5 Maintenance release.

Actions #4

Updated by O'Neil Delpratt about 1 year ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF