|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Custom handler for errors and warnings.
Applications can implement this handler to control the reporting
of errors and warnings through the NewsMLTestManager
. By
default, warnings are printed to stderr and errors cause an exception,
but the user-supplied visitor can perform different actions. If the
handlers throw exceptions, they will stop the conformance; otherwise,
the manager will continue until the end of the tests.
Method Summary | |
void |
error(BaseNode node,
NewsMLException e)
Report an error. |
void |
warning(BaseNode node,
NewsMLException e)
Report a warning. |
Method Detail |
public void warning(BaseNode node, NewsMLException e) throws NewsMLException
The application can implement this method to receive notification of warnings and perform its own, customized actions in response to them. If desired, the application can throw an exception to stop the processing.
The default implementation prints the warning message to standard error and continues.
e
- A NewsMLException containing the warning information.public void error(BaseNode node, NewsMLException e) throws NewsMLException
The application can implement this method to receive notification of errors and perform its own, customized actions in response to them. If desired, the application can throw an exception to stop the processing.
The default implementation rethrows the exception and stops processing.
e
- A NewsMLException containing the error information.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |