org.omegahat.Environment.Debugger
Class BasicErrorHandler
java.lang.Object
|
+--org.omegahat.Environment.Debugger.BasicErrorHandler
- All Implemented Interfaces:
- ErrorHandler
- Direct Known Subclasses:
- DefaultErrorHandler, SystemErrorHandler
- public abstract class BasicErrorHandler
- extends java.lang.Object
- implements ErrorHandler
Abstract class defining the default methods
implementing an error handler for the
Evaluator
class.
|
Field Summary |
protected Evaluator |
evaluator
Evaluator with which this error handler is associated. |
|
Constructor Summary |
BasicErrorHandler()
|
BasicErrorHandler(Evaluator evaluator)
"Constructs" an object of this class, caching the
specified evaluator for use in other methods. |
BasicErrorHandler(java.lang.Throwable e,
java.lang.String msg,
Evaluator eval)
Construct the error handler with an actual error
from an evaluator in the form of an exception and explaining message. |
|
Method Summary |
java.lang.Object |
error(java.lang.Throwable e,
java.lang.String msg)
Wraps this call with a call to the more thorough
handler which specifies the currently active expression
in which the error was raised. |
abstract java.lang.Object |
error(java.lang.Throwable e,
java.lang.String msg,
ExpressionInt expr)
Standard method for handling the error. |
Evaluator |
evaluator()
Returns the evaluator with which this error handler is associated. |
Evaluator |
evaluator(Evaluator e)
Sets the evaluator with which this handler is
associated. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
evaluator
protected Evaluator evaluator
- Evaluator with which this error handler is associated.
BasicErrorHandler
public BasicErrorHandler()
BasicErrorHandler
public BasicErrorHandler(Evaluator evaluator)
- "Constructs" an object of this class, caching the
specified evaluator for use in other methods.
BasicErrorHandler
public BasicErrorHandler(java.lang.Throwable e,
java.lang.String msg,
Evaluator eval)
- Construct the error handler with an actual error
from an evaluator in the form of an exception and explaining message.
This uses the standard methods to report the error.
evaluator
public Evaluator evaluator()
- Returns the evaluator with which this error handler is associated.
evaluator
public Evaluator evaluator(Evaluator e)
- Sets the evaluator with which this handler is
associated.
error
public java.lang.Object error(java.lang.Throwable e,
java.lang.String msg)
- Wraps this call with a call to the more thorough
handler which specifies the currently active expression
in which the error was raised.
error
public abstract java.lang.Object error(java.lang.Throwable e,
java.lang.String msg,
ExpressionInt expr)
- Standard method for handling the error.
- Specified by:
error in interface ErrorHandler