Project

Profile

Help

Bug #6257

closed

Gizmo quits after certain errors

Added by Michael Kay about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2023-11-20
Due date:
% Done:

100%

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

Description

If a Gizmo command attempts to read a collection and parsing of one of the XML files fails, then rather than reporting the error and going back to the Gizmo prompt, Gizmo exits with a stack trace.

Actions #1

Updated by Michael Kay about 1 year ago

Fixed by catching an UncheckedXPathException thrown by a Gizmo command, and handling it the same way as a checked XPath exception.

There's a remaining separate issue of duplication in the parser error message:

Error on line 15 column 8 of items.xml:
  SXXP0003   Error reported by XML parser: The markup in the document following the root
  element must be well-formed.: The markup in the document following the root element must
  be well-formed.
Actions #2

Updated by Michael Kay about 1 year ago

The longstanding problem of duplication in the error message appears to happen when we wrap the SAXException thrown by the XML parser in an XPathException. We inherit this code from the parent class TransformerException so there's not much we can do about it.

However, we have already reported the errors quite properly formatted based on the information supplied by the XML parser to the ErrorHandler callback:

Error on line 15 column 8 of items.xml:
  SXXP0003   Error reported by XML parser: The markup in the document following the root
  element must be well-formed.

Perhaps we should recover this information on return from the parser and ignore the actual SAXException that is thrown.

Actions #3

Updated by Michael Kay about 1 year ago

  • Category changed from Gizmo to Diagnostics
  • Status changed from New to Resolved
  • Applies to branch 12, trunk added
  • Platforms .NET, Java added
Actions #4

Updated by O'Neil Delpratt about 1 year ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 12.4 added

Bug fix applied in the Saxon 12.4 maintenance release

Please register to edit this issue

Also available in: Atom PDF