|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ModelErrorHandler
Interface for model error handlers. A model error is an exception that is passed up the Ptolemy II hierarchy for handling until a container with a registered error handler is found. If there is no registered error handler, then the error is ignored. It is like throwing an exception, except that instead of unraveling the calling stack, it travels up the Ptolemy II hierarchy.
A typical use of this facility is where an actor does the following:
handleModelError(this, new IllegalActionException(this, message));instead of this:
throw new IllegalActionException(this, message);The former allows a container in the hierarchy to intercept the exception, whereas the latter simply throws the exception.
| Green (hyzheng) |
| Green (eal) |
| Method Summary | |
|---|---|
boolean |
handleModelError(NamedObj context,
IllegalActionException exception)
Handle a model error. |
| Method Detail |
|---|
boolean handleModelError(NamedObj context,
IllegalActionException exception)
throws IllegalActionException
context - The object in which the error occurred.exception - An exception that represents the error.
IllegalActionException - If the handler handles the
error by throwing an exception.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||