Project

Profile

Help

Bug #4364

closed

Better handling for UncheckedXPathException

Added by Radu Coravu over 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2019-10-29
Due date:
% Done:

0%

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

Description

In the DITA Open Toolkit there is some Java code running a transform with Saxon 9.9 over an XSLT stylesheet and it breaks with an UncheckedXPathException, the entire stack trace is logged here:

https://github.com/dita-ot/dita-ot/issues/3395

A couple of things which seem not quite right to me:

  • I do not expect the "TransformerImpl.transform" method to throw RuntimeExceptions, the jaxp interface does not state that it could do that. In my opinion on the method "net.sf.saxon.jaxp.TransformerImpl.transform()" the exception should be caught, unwrapped and the XPathException inside it thrown again.
  • The UncheckedXPathException once created should at least inherit the stack trace, system ID and line/column information from the embedded XPathException, otherwise when it is logged in the console I have no idea in which stylesheet the problem was..

Please register to edit this issue

Also available in: Atom PDF