|
|||||||||||
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 | +--bsh.TargetError
TargetError is an EvalError that wraps an exception thrown by the script (or by code called from the script). TargetErrors indicate exceptions which can be caught within the script itself, whereas a general EvalError indicates that the script cannot be evaluated further for some reason. If the exception is caught within the script it is automatically unwrapped, so the code looks like normal Java code. If the TargetError is thrown from the eval() or interpreter.eval() method it may be caught and unwrapped to determine what exception was thrown.
Constructor Summary | |
TargetError(java.lang.String msg,
java.lang.Throwable t,
bsh.SimpleNode node,
CallStack callstack,
boolean inNativeCode)
|
|
TargetError(java.lang.Throwable t,
bsh.SimpleNode node,
CallStack callstack)
|
Method Summary | |
java.lang.Throwable |
getTarget()
|
boolean |
inNativeCode()
Return true if the TargetError was generated from native code. |
void |
printStackTrace()
|
void |
printStackTrace(boolean debug,
java.io.PrintStream out)
|
void |
printStackTrace(java.io.PrintStream out)
|
java.lang.String |
printTargetError(java.lang.Throwable t)
Generate a printable string showing the wrapped target exception. |
java.lang.String |
toString()
Print the error with line number and stack trace. |
java.lang.String |
xPrintTargetError(java.lang.Throwable t)
Extended form of print target error. |
Methods inherited from class bsh.EvalError |
getErrorLineNumber, getErrorSourceFile, getErrorText, getMessage, getScriptStackTrace, prependMessage, reThrow, setMessage |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TargetError(java.lang.String msg, java.lang.Throwable t, bsh.SimpleNode node, CallStack callstack, boolean inNativeCode)
public TargetError(java.lang.Throwable t, bsh.SimpleNode node, CallStack callstack)
Method Detail |
public java.lang.Throwable getTarget()
public java.lang.String toString()
EvalError
toString
in class EvalError
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream out)
printStackTrace
in class java.lang.Throwable
public void printStackTrace(boolean debug, java.io.PrintStream out)
public java.lang.String printTargetError(java.lang.Throwable t)
public java.lang.String xPrintTargetError(java.lang.Throwable t)
public boolean inNativeCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |