Skip to content

Instantly share code, notes, and snippets.

@joewiz
Created October 12, 2017 17:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joewiz/82c4e0631723e859ce8dead34321ea9e to your computer and use it in GitHub Desktop.
Save joewiz/82c4e0631723e859ce8dead34321ea9e to your computer and use it in GitHub Desktop.
XQuery 3.0 try/catch boilerplate, returning all error variables
xquery version "3.1";
try {
fn:error()
} catch * {
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
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment