20080913, rgf

org.apache.bsf
Class BSFException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.apache.bsf.BSFException
All Implemented Interfaces:
java.io.Serializable

public class BSFException
extends java.lang.Exception

If something goes wrong while doing some scripting stuff, one of these is thrown. The integer code indicates what's wrong and the message may give more details. The reason one exception with multiple meanings (via the code) [instead of multiple exception types] is used is due to the interest to keep the run-time size small.

Author:
Sanjiva Weerawarana
See Also:
Serialized Form

Field Summary
(package private)  int reason
           
static int REASON_EXECUTION_ERROR
           
static int REASON_INVALID_ARGUMENT
           
static int REASON_IO_ERROR
           
static int REASON_OTHER_ERROR
           
static int REASON_UNKNOWN_LANGUAGE
           
static int REASON_UNSUPPORTED_FEATURE
           
(package private)  java.lang.Throwable targetThrowable
           
 
Fields inherited from class java.lang.Exception
 
Constructor Summary
BSFException(int reason, java.lang.String msg)
           
BSFException(int reason, java.lang.String msg, java.lang.Throwable t)
           
BSFException(java.lang.String msg)
           
 
Method Summary
 int getReason()
           
 java.lang.Throwable getTargetException()
           
 void printStackTrace()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REASON_INVALID_ARGUMENT

public static final int REASON_INVALID_ARGUMENT
See Also:
Constant Field Values

REASON_IO_ERROR

public static final int REASON_IO_ERROR
See Also:
Constant Field Values

REASON_UNKNOWN_LANGUAGE

public static final int REASON_UNKNOWN_LANGUAGE
See Also:
Constant Field Values

REASON_EXECUTION_ERROR

public static final int REASON_EXECUTION_ERROR
See Also:
Constant Field Values

REASON_UNSUPPORTED_FEATURE

public static final int REASON_UNSUPPORTED_FEATURE
See Also:
Constant Field Values

REASON_OTHER_ERROR

public static final int REASON_OTHER_ERROR
See Also:
Constant Field Values

reason

int reason

targetThrowable

java.lang.Throwable targetThrowable
Constructor Detail

BSFException

public BSFException(int reason,
                    java.lang.String msg)

BSFException

public BSFException(int reason,
                    java.lang.String msg,
                    java.lang.Throwable t)

BSFException

public BSFException(java.lang.String msg)
Method Detail

getReason

public int getReason()

getTargetException

public java.lang.Throwable getTargetException()

printStackTrace

public void printStackTrace()

20080913, rgf