Project

Profile

Help

Bug #4621

Exception raised by xsl:message terminate="yes" is intercepted by an Atomizer

Added by Michael Kay 14 days ago. Updated 12 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2020-06-29
Due date:
% Done:

0%

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

Description

When the result of an expression needs to be atomized, and that expression fails because of <xsl:message terminate="yes">, the atomizer catches the termination exception and adds to the exception message; in the course of this it loses the fact that the exception originated with xsl:message, and as a consequence (for example) the dynamic error information variable $err:value is incorrectly set when the exception is subsequently caught by a try/catch.

The Atomizer expression recognises the exception thrown by a call to fn:error() and treats it specially; it needs to do the same with the exception thrown by a call to xsl:message.

Raised by AirQuick on the saxon-help mailing list.

History

#1 Updated by Michael Kay 14 days ago

Also applies to the SingletonAtomizer. Unfortunately there's no easy way of discovering whether there are other paths where the problem might occur.

#2 Updated by Michael Kay 14 days ago

Note that there's a slight change here between 9.9 and 10.0. In 10.0, the Atomizer intercepts all exceptions other than the UserDefinedXPathException raised by a call to fn:error(). In 9.9, it intercepts all exceptions other than those whose error code is in a non-standard namespace. Also, in 9.9, SingletonAtomizer does not intercept the exception.

#3 Updated by Michael Kay 12 days ago

  • Status changed from In Progress to Resolved
  • Applies to branch 10, 9.9 added
  • Fix Committed on Branch 10, 9.9 added

Patch committed on the 9.9 and 10 branches.

Please register to edit this issue

Also available in: Atom PDF