This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 18356 - [XSLT 2.0] catching type errors
Summary: [XSLT 2.0] catching type errors
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 (show other bugs)
Version: Working drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-23 12:01 UTC by Michael Kay
Modified: 2013-02-16 12:38 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2012-07-23 12:01:40 UTC
ACTION A-515-03 on Michael Kay to raise a bug against XSLT to bring it in line with the decision made in bug https://www.w3.org/Bugs/Public/show_bug.cgi?id=16370 (Does a TryCatch expression catch a type error raised during the static analysis phase?) 

Effects include:

(a) try/catch can catch type errors if they are not detected statically

(b) a try/catch around the body of a function does NOT catch the type error that occurs if the body of the function delivers the wrong type of result. This can be caught only by putting a try/catch around the function call.

(c) equally, a try/catch in the initializer of a variable will not catch the error when the initializer's result does not match the variable declaration. In the case of a global variable this error cannot be caught, because there is nowhere to catch it.
Comment 1 Michael Kay 2013-02-11 16:09:05 UTC
Action on the editor to check whether this is consistent with what the spec currently says or if not, what changes are needed.
Comment 2 Michael Kay 2013-02-13 23:24:56 UTC
The rules for try/catch have been clarified to cover the points listed.
Comment 3 Michael Kay 2013-02-16 12:38:43 UTC
Changes applied in draft N.