ptolemy.kernel.util
Class BasicModelErrorHandler
java.lang.Object
ptolemy.kernel.util.BasicModelErrorHandler
- All Implemented Interfaces:
- ModelErrorHandler
public class BasicModelErrorHandler
- extends java.lang.Object
- implements ModelErrorHandler
Default model error handler. 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. This class handles the error by simply throwing the
exception that has been passed to it.
- Since:
- Ptolemy II 2.1
- Version:
- $Id: BasicModelErrorHandler.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Edward A. Lee
- Accepted Rating:
- Proposed Rating:
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicModelErrorHandler
public BasicModelErrorHandler()
handleModelError
public boolean handleModelError(NamedObj context,
IllegalActionException exception)
throws IllegalActionException
- Handle a model error by throwing the specified exception.
- Specified by:
handleModelError
in interface ModelErrorHandler
- Parameters:
context
- The object in which the error occurred.exception
- An exception that represents the error.
- Returns:
- Never returns.
- Throws:
IllegalActionException
- The exception passed
as an argument is always thrown.