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 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

From: []
Sent: 16 December 2008 15:38
Subject: [saxon] xquery exception/error handling


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

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

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.