bsh
Class EvalError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--bsh.EvalError
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ClassPathException, TargetError

public class EvalError
extends java.lang.Exception

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.

See Also:
TargetError, Serialized Form

Constructor Summary
EvalError(java.lang.String s)
           
EvalError(java.lang.String s, bsh.SimpleNode node)
           
 
Method Summary
protected  void addNode(bsh.SimpleNode addNode)
           
 int getErrorLineNumber()
           
 java.lang.String getErrorSourceFile()
           
 java.lang.String getErrorText()
           
 java.lang.String getMessage()
           
protected  void prependMessage(java.lang.String s)
          Prepend the message if it is non-null.
 void reThrow(bsh.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, bsh.SimpleNode addNode)
          Re-throw the eval error, prefixing msg to the message and specifying the node.
 void setMessage(java.lang.String s)
           
 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
 

Constructor Detail

EvalError

public EvalError(java.lang.String s)

EvalError

public EvalError(java.lang.String s,
                 bsh.SimpleNode node)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable

reThrow

public void reThrow(java.lang.String msg)
             throws EvalError
Re-throw the eval error, prepending msg to the message.

EvalError

reThrow

public void reThrow(bsh.SimpleNode node)
             throws EvalError
Re-throw the eval error, specifying the node. If a node already exists the argument node is ignored.

EvalError
See Also:
#setNode( bsh.SimpleNode )

reThrow

public void reThrow(java.lang.String addMsg,
                    bsh.SimpleNode addNode)
             throws EvalError
Re-throw the eval error, prefixing msg to the message and specifying the node. If a node already exists the addNode is ignored.

EvalError
See Also:


getErrorText

public java.lang.String getErrorText()

getErrorLineNumber

public int getErrorLineNumber()

getErrorSourceFile

public java.lang.String getErrorSourceFile()

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

setMessage

public void setMessage(java.lang.String s)

prependMessage

protected void prependMessage(java.lang.String s)
Prepend the message if it is non-null.


addNode

protected void addNode(bsh.SimpleNode addNode)


© 2000 pat@pat.net :-)