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 18868 - [QT3TS] try-catch-all-dynamic-errors-caught-1
Summary: [QT3TS] try-catch-all-dynamic-errors-caught-1
Status: CLOSED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-13 14:11 UTC by Tim Mills
Modified: 2012-09-13 15:43 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2012-09-13 14:11:48 UTC
I disagree with the expected result of the following test.

  <test-case name="try-catch-all-dynamic-errors-caught-1">
    <description>XPDY0002 must be caught.</description>
    <created by="Ghislain Fourny" on="2011-07-28"/>
    <environment ref="err"/>
    
    <test>try { . } catch err:XPDY0002 { "Context item not set." }</test>
    <result>
      <assert-string-value>Context item not set.</assert-string-value>
    </result>
  </test-case>

I do not think that XPDY0002 should be caught here.

Recall that . is represented by the Formal Semantics as a variable called $fs:dot.

Compare with variations on this test:

declare variable $x external;
try { $x } catch err:XPDY0002 { "External variable not set." }

declare variable $x := fn:error("err:XPDY0002");
try { $x } catch err:XPDY0002 { "External variable raised error." }
Comment 1 Tim Mills 2012-09-13 15:00:56 UTC
Here's one further example.

declare variable $x := .;
try { $x } catch err:XPDY0002 { "External variable raised error." }
Comment 2 Tim Mills 2012-09-13 15:43:45 UTC
On second thoughts, I now agree with the expected result.