W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2012

[Bug 18877] New: [XQ30] try/catch

From: <bugzilla@jessica.w3.org>
Date: Fri, 14 Sep 2012 11:02:05 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-18877-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=18877

           Summary: [XQ30] try/catch
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3.0
        AssignedTo: jonathan.robie@gmail.com
        ReportedBy: tim@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


The specification states:

"A try/catch expression catches dynamic errors and type errors raised during
dynamic evaluation for expressions that are lexically contained within the try
clause."

Consider the contrived example:

declare function local:func()
{
  try
  {
    return function($arg)
           { 
             10 div $arg
           }
  }
  catch *
  {
    0
  }
};

local:func()(0)

10 div 0 will raise a dynamic error.  The expression 10 div $arg appears to be
lexically contained within the try clause.  While it is surely not the intent
of the specification that such a dynamic error would be caught, I can't point
to anything in the specification to be sure.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Friday, 14 September 2012 11:02:11 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:49 UTC