|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--bsh.EvalError
EvalError indicates that we cannot continue evaluating the script or the script has thrown an exception. EvalError may be thrown for a script syntax error, an evaluation error such as referring to an undefined variable, an internal error. If the script has thrown an exception the exception will be wrapped in a TargetError.
TargetError
,
Serialized FormField Summary | |
java.util.List |
arguments
|
java.lang.String |
className
|
int |
endColumn
|
int |
endLine
|
(package private) java.lang.String |
message
|
java.lang.String |
methodName
|
(package private) SimpleNode |
node
Note: we could make this a vector and hold the full stack trace of method invocations that lead to the exception... |
int |
startColumn
|
int |
startLine
|
java.lang.String |
tokenName
|
java.lang.String |
warnUserMessage
|
Fields inherited from class java.lang.Exception |
|
Fields inherited from class java.lang.Throwable |
|
Constructor Summary | |
EvalError(java.lang.String s)
|
|
EvalError(java.lang.String s,
SimpleNode node)
|
Method Summary | |
protected void |
addNode(SimpleNode addNode)
|
int |
getErrorLineNumber()
|
java.lang.String |
getErrorSourceFile()
|
java.lang.String |
getErrorText()
|
java.lang.String |
getMessage()
|
(package private) SimpleNode |
getNode()
The error has trace info associated with it. |
protected void |
prependMessage(java.lang.String s)
Prepend the message if it is non-null. |
void |
reThrow(SimpleNode node)
Re-throw the eval error, specifying the node. |
void |
reThrow(java.lang.String msg)
Re-throw the eval error, prepending msg to the message. |
void |
reThrow(java.lang.String addMsg,
SimpleNode addNode)
Re-throw the eval error, prefixing msg to the message and specifying the node. |
void |
setMessage(java.lang.String s)
|
(package private) void |
setNode(SimpleNode node)
Set the AST node for trace info. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int startLine
public int endLine
public int startColumn
public int endColumn
public java.lang.String tokenName
public java.lang.String className
public java.lang.String methodName
public java.util.List arguments
public java.lang.String warnUserMessage
SimpleNode node
java.lang.String message
Constructor Detail |
public EvalError(java.lang.String s)
public EvalError(java.lang.String s, SimpleNode node)
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Throwable
public void reThrow(java.lang.String msg) throws EvalError
EvalError
public void reThrow(SimpleNode node) throws EvalError
EvalError
setNode( bsh.SimpleNode )
public void reThrow(java.lang.String addMsg, SimpleNode addNode) throws EvalError
EvalError
void setNode(SimpleNode node)
This is useful for the interpreter if it detects that there is no
trace info and wants to supply the Line() AST before printing.
SimpleNode getNode()
public java.lang.String getErrorText()
public int getErrorLineNumber()
public java.lang.String getErrorSourceFile()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public void setMessage(java.lang.String s)
protected void prependMessage(java.lang.String s)
protected void addNode(SimpleNode addNode)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |