W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2015

[Bug 29264] New: XQuery err details as a map

From: <bugzilla@jessica.w3.org>
Date: Fri, 06 Nov 2015 10:48:43 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29264-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29264

            Bug ID: 29264
           Summary: XQuery err details as a map
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3.1
          Assignee: jonathan.robie@gmail.com
          Reporter: andybuncester@gmail.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

Within the catch() of a try-catch expression [1] available various error
details are made available as variables e.g. $err:code. 
As a XQuery developer I want to use common error logging/handling routines
across an application or applications. 
It is tedious to pass all the error details into such a common function. 
Now maps are part of XQuery, I would find useful a function something like

declare function err:details() as map(*)

Within the catch expression it would return the value of

 map{
               "code":$err:code,
               "description":$err:description,
               "value":$err:value,
               "module":$err:module,
               "line-number":$err:line-number,
                "column-number":$err:column-number,
               "additional":$err:additional 
               }

An example use would look like:

try{
   ...
}
catch * { 
   myerrorhandler( err:details() )
}

/Andy

[1]  http://www.w3.org/TR/xquery-31/#id-try-catch

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Friday, 6 November 2015 10:48:47 UTC

This archive was generated by hypermail 2.3.1 : Friday, 6 November 2015 10:48:48 UTC