|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.StandardErrorListener com.saxonica.extra.XQueryErrorListener
public class XQueryErrorListener
An ErrorListener for use when running schema-aware XQuery. It differs from the standard error listener in that it can produce a stack trace when a run-time error occurs.
Constructor Summary | |
---|---|
XQueryErrorListener()
|
Method Summary | |
---|---|
void |
error(TransformerException exception)
Receive notification of a recoverable error. |
void |
fatalError(TransformerException exception)
Receive notification of a non-recoverable error. |
StandardErrorListener |
makeAnother(int hostLanguage)
Make a clean ErrorListener. |
static void |
printStackTrace(PrintStream out,
XPathContext context)
Print a stack trace to a specified output destination |
void |
setProduceStackTrace(boolean doIt)
Set an option to control whether or not this error listener will produce a stack trace when a run-time error occurs. |
void |
warning(TransformerException exception)
Receive notification of a warning. |
Methods inherited from class net.sf.saxon.StandardErrorListener |
---|
getErrorOutput, getExpandedMessage, getLocationMessage, getRecoveryPolicy, setErrorOutput, setRecoveryPolicy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XQueryErrorListener()
Method Detail |
---|
public void setProduceStackTrace(boolean doIt)
doIt
- true if a stack trace is to be produced when an error occurs; false if the
stack trace is to be suppressed.public void warning(TransformerException exception) throws TransformerException
Transformers can use this method to report conditions that are not errors or fatal errors. The default behaviour is to take no action.
After invoking this method, the Transformer must continue with the transformation. It should still be possible for the application to process the document through to the end.
warning
in interface ErrorListener
warning
in class StandardErrorListener
exception
- The warning information encapsulated in a
transformer exception.
TransformerException
- if the application
chooses to discontinue the transformation.TransformerException
public void error(TransformerException exception) throws TransformerException
The transformer must continue to provide normal parsing events after invoking this method. It should still be possible for the application to process the document through to the end.
The action of the standard error listener depends on the recovery policy that has been set, which may be one of RECOVER_SILENTLY, RECOVER_WITH_WARNING, or DO_NOT_RECOVER
error
in interface ErrorListener
error
in class StandardErrorListener
exception
- The error information encapsulated in a
transformer exception.
TransformerException
- if the application
chooses to discontinue the transformation.TransformerException
public void fatalError(TransformerException exception) throws TransformerException
The application must assume that the transformation cannot continue after the Transformer has invoked this method, and should continue (if at all) only to collect addition error messages. In fact, Transformers are free to stop reporting events once this method has been invoked.
fatalError
in interface ErrorListener
fatalError
in class StandardErrorListener
exception
- The error information encapsulated in a
transformer exception.
TransformerException
- if the application
chooses to discontinue the transformation.TransformerException
public static void printStackTrace(PrintStream out, XPathContext context)
public StandardErrorListener makeAnother(int hostLanguage)
makeAnother
in class StandardErrorListener
hostLanguage
- the host language (not used by this implementation)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |