From: Scott Bale <sbale@me...> - 2004-05-04 16:01:48
I have a question about the error() method of
net.sf.saxon.StandardErrorListener. I notice this class contains a recovery
policy which controls whether the warning() method rethrows the exception
parameter or not. The fatalError() method always rethrows the exception
parameter. So far so good. Why doesn't the error() method throw an
exception? I was expecting the error() method to be modeled after the
warning() method, to throw the exception according to the recovery policy.
In fact, I just noticed that the javadoc of the error() method claims this
is exactly what it should do.
To give you some context (if you're interested):
I have Saxon embedded in my app, and I submitted an xquery in which I forgot
to put quotes around the parameter to the doc() function - I had written
doc(foo) instead of doc("foo"). This failed silently - I simply got no
results. The only indication of a problem was that this was written to my
Error at sequence on line 6
The context item for an axis step is not set
Here is a partial stack trace at the point at which error() is called:
StandardErrorListener.error(TransformerException) line: 124
XQueryExpression.iterator(DynamicQueryContext) line: 155
XQueryExpression.evaluate(DynamicQueryContext) line: 66
It would be much more useful to me if an exception would be thrown in this
case. Could this be a bug, or am I misunderstanding the intention of the
recovery policy somehow? Thanks for your help.
Get latest updates about Open Source Projects, Conferences and News.