Threw to top level when I made an error in an expression.
It should wrap this as a diagnostic object, and of course give me the context of the object in the schema whose expression contains the error.
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
Note that the error was that I wrote "
{ if (../tns:x eq 0) then true else false }" – see the error. There's no true or false in Xpath. You have to write true() and false().