In conjunction with xsl:try, the
xsl:catch instruction allows recovery from dynamic errors.
Permitted parent elements: xsl:try
Indicates which error codes are caught. If
absent, or if set to
The effect of the element may be defined
either by a
Available in XSLT 3.0. From Saxon 9.8, available in all editions. Implemented in Saxon-PE and Saxon-EE since Saxon 9.6. Available for all platforms.
It is possible to have more than one
xsl:catch within an
xsl:try; the first one that matches the error is used.
xsl:catch, a number of variables are available in the
err:code- the error code as a QName
err:description- the error description (error message)
err:value- the error object (if available)
err:module- the URI of the stylesheet module in which the error occurred
err:line-number- the line-number of the source stylesheet where the error occurred
err:column-number- for Saxon this will generally be unknown (-1)
The error can be re-thrown by using the