public class SimpleErrorHandler extends java.lang.Object implements ErrorHandler
MoMLParser
Red (cxh) |
Red (cxh) |
CANCEL, CONTINUE, RETHROW
Constructor and Description |
---|
SimpleErrorHandler()
Create an error handler that throws an exception.
|
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 throwing an exception.
|
public SimpleErrorHandler()
public 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.