Changes

Jump to navigation Jump to search
449 bytes removed ,  11:58, 4 January 2011
no edit summary
Note: To call the <code>write</code> method of the filewriter class you have to pass a
instantiated filewriter-object as first parameter to the method.
 
==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 1.1 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]]
bueraucrat, Bureaucrats, editor, reviewer, Administrators
907

edits

Navigation menu