public class StreamErrorHandler extends java.lang.Object implements ErrorHandler
MoMLParser
CANCEL, CONTINUE, RETHROW
Constructor and Description |
---|
StreamErrorHandler()
Create an error handler that sends messages to the standard error.
|
StreamErrorHandler(java.io.OutputStream out)
Create an error handler that sends messages to the specified stream.
|
Modifier and Type | Method and Description |
---|---|
void |
enableErrorSkipping(boolean enable)
Enable or disable skipping of errors.
|
int |
handleError(java.lang.String element,
NamedObj context,
java.lang.Throwable exception)
Handle an error by printing a description of the error to
the stream specified in the constructor.
|
public StreamErrorHandler()
public StreamErrorHandler(java.io.OutputStream out)
out
- The OutputStreampublic void enableErrorSkipping(boolean enable)
enableErrorSkipping
in interface ErrorHandler
enable
- True to enable skipping, false to disable.public int handleError(java.lang.String element, NamedObj context, java.lang.Throwable exception)
handleError
in interface ErrorHandler
element
- The XML element that triggered the error.context
- The container object for the element.exception
- The exception that was thrown.