Package 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$
- Author:
- Edward A. Lee
- Pt.AcceptedRating:
- Green (hyzheng)
- Pt.ProposedRating:
- Green (eal)
-
-
Constructor Summary
Constructors Constructor Description BasicModelErrorHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
handleModelError(NamedObj context, IllegalActionException exception)
Handle a model error by throwing the specified exception.
-
-
-
Method Detail
-
handleModelError
public boolean handleModelError(NamedObj context, IllegalActionException exception) throws IllegalActionException
Handle a model error by throwing the specified exception.- Specified by:
handleModelError
in interfaceModelErrorHandler
- 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.
-
-