Changes

Jump to navigation Jump to search
469 bytes added ,  14:01, 12 January 2011
Created page with "==Try/Catch== The well-known try/catch construct can be used in BaseX to intercept run-time errors. This feature will also be part of the new [http://www.w3.org/TR/xquery-11/#id..."
==Try/Catch==

The well-known try/catch construct can be used in BaseX to intercept
run-time errors. This feature will also be part of the new
[http://www.w3.org/TR/xquery-11/#id-try-catch XQuery 3.0 Recommendation].

'''Example:'''
<pre class="brush:xquery"> try {
1 + '2'
} catch *($code, $desc) {
concat('Error [', $code, ']: ', $desc)
}</pre>
'''Result:''' <code>Error [XPTY0004]: '+' operator: number expected, string found.</code>

[[Category:XQuery]]
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu