The saxon:try() function is currently the only way of doing this. Both forms of this function were available in Saxon 8.9.
 
The current draft of XQuery 1.1 at http://www.w3.org/TR/xquery-11/ includes proposed syntax for a try/catch facility, and I have implemented most of this for release in Saxon 9.2. I don't yet have a date for that, however.
 
Michael Kay
http://www.saxonica.com/


From: jel@formula400.hu [mailto:jel@formula400.hu]
Sent: 16 December 2008 15:38
To: saxon-help@lists.sourceforge.net
Subject: [saxon] xquery exception/error handling


Hi,

I woluld like to use exception/error handling in my xqueries with saxon-sa 8.9.0.4.

Using the saxon:try() function is the only way of error handling in the queries?
Which is the suitable saxon version? ( I have 8.9.0.4)

If there are other ways handling exceptions as well (for example try/catch block similar to java)
please send me an example and inform me which saxon version is suitable for that.

Thanks

jegalaci