Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.saxonica.extra
Class XQueryErrorListener

    java.lang.Object
      net.sf.saxon.StandardErrorListener
          com.saxonica.extra.XQueryErrorListener

All Implemented Interfaces:
  javax.xml.transform.ErrorListener, java.io.Serializable

public class XQueryErrorListener
extends StandardErrorListener

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.

See Also:
  Serialized Form

Field Summary

Fields inherited from class net.sf.saxon.StandardErrorListener
`errorOutput`

Constructor Summary
`XQueryErrorListener()`

Method Summary
`void` | `error(javax.xml.transform.TransformerException exception)` Receive notification of a recoverable error.
`void` | `fatalError(javax.xml.transform.TransformerException exception)` Receive notification of a non-recoverable error.
`StandardErrorListener` | `makeAnother(int hostLanguage)` Make a clean ErrorListener.
`static void` | `printStackTrace(java.io.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(javax.xml.transform.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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XQueryErrorListener

    public XQueryErrorListener()

Method Detail

### setProduceStackTrace

    public 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. By default, it will produce a stack trace.

  Parameters:
    `doIt` - true if a stack trace is to be produced when an error occurs; false if the stack trace is to be suppressed.

### warning

    public void warning(javax.xml.transform.TransformerException exception)
                 throws javax.xml.transform.TransformerException

  Receive notification of a warning.

  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.

  Specified by:
    `warning` in interface `javax.xml.transform.ErrorListener`
  Overrides:
    `warning` in class `StandardErrorListener`
  Parameters:
    `exception` - The warning information encapsulated in a transformer exception.
  Throws:
    `javax.xml.transform.TransformerException` - if the application chooses to discontinue the transformation.
  See Also:
    `TransformerException`

### error

    public void error(javax.xml.transform.TransformerException exception)
               throws javax.xml.transform.TransformerException

  Receive notification of a recoverable error.

  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

  Specified by:
    `error` in interface `javax.xml.transform.ErrorListener`
  Overrides:
    `error` in class `StandardErrorListener`
  Parameters:
    `exception` - The error information encapsulated in a transformer exception.
  Throws:
    `javax.xml.transform.TransformerException` - if the application chooses to discontinue the transformation.
  See Also:
    `TransformerException`

### fatalError

    public void fatalError(javax.xml.transform.TransformerException exception)
                    throws javax.xml.transform.TransformerException

  Receive notification of a non-recoverable error.

  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.

  Specified by:
    `fatalError` in interface `javax.xml.transform.ErrorListener`
  Overrides:
    `fatalError` in class `StandardErrorListener`
  Parameters:
    `exception` - The error information encapsulated in a transformer exception.
  Throws:
    `javax.xml.transform.TransformerException` - if the application chooses to discontinue the transformation.
  See Also:
    `TransformerException`

### printStackTrace

    public static void printStackTrace(java.io.PrintStream out,
                                       XPathContext context)

  Print a stack trace to a specified output destination

### makeAnother

    public StandardErrorListener makeAnother(int hostLanguage)

  Make a clean ErrorListener. This is necessary because the standard error listener is stateful (it remembers how many errors there have been)

  Overrides:
    `makeAnother` in class `StandardErrorListener`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD