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 7087 - [XQuery11] syntax errors in try-catch examples
Summary: [XQuery11] syntax errors in try-catch examples
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.0 (show other bugs)
Version: Working drafts
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords: needsReview
Depends on:
Blocks:
 
Reported: 2009-07-07 16:42 UTC by Tim Kraska
Modified: 2009-08-25 10:13 UTC (History)
1 user (show)

See Also:


Attachments

Description Tim Kraska 2009-07-07 16:42:26 UTC
- "$x cast as integer" should be "$x cast as xs:integer"

- "define function" should be "declare function"

- Instead of XPST0051 would not be the error code FORG0001 better?
Comment 1 Jonathan Robie 2009-07-14 15:58:16 UTC
Why do you prefer the FORG error?

I will fix the rest editorially.
Comment 2 Jonathan Robie 2009-07-14 16:06:07 UTC
Ah, I see the problem - the examples attempt to catch static errors:

#

A try/catch expression without a CatchErrorList catches any error:


The CatchErrorList in this try/catch expression specifies that only err:XPST0051 is caught:

try {
    $x cast as integer
}
catch err:XPST0051 {
    0
}

#

The CatchErrorList in this try/catch expression specifies that errors err:XPST0051 and err:XPST0032 are caught:

try {
    $x cast as integer
}
catch err:XPST0051 | err:XPST0032 {
    0
}


I'll fix that, you can't catch a static error.
Comment 3 Jonathan Robie 2009-08-25 10:13:56 UTC
Fixed, will show up in next internal commit.