Package org.apache.bsf

# Class BSFException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.bsf.BSFException

All Implemented Interfaces:
  `Serializable`

public class BSFException extends 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

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `REASON_EXECUTION_ERROR`
  `static final int`
  `REASON_INVALID_ARGUMENT`
  `static final int`
  `REASON_IO_ERROR`
  `static final int`
  `REASON_OTHER_ERROR`
  `static final int`
  `REASON_UNKNOWN_LANGUAGE`
  `static final int`
  `REASON_UNSUPPORTED_FEATURE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BSFException(int reason, String msg)`
  `BSFException(int reason, String msg, Throwable t)`
  `BSFException(String msg)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Throwable`
  `getCause()`
  `int`
  `getReason()`
  `Throwable`
  `getTargetException()`
  `void`
  `printStackTrace()`

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### 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

- ## Constructor Details

  - ### BSFException

    public BSFException(int reason, String msg)

  - ### BSFException

    public BSFException(int reason, String msg, Throwable t)

  - ### BSFException

    public BSFException(String msg)

- ## Method Details

  - ### getReason

    public int getReason()

  - ### getTargetException

    public Throwable getTargetException()

  - ### getCause

    public Throwable getCause()
    Overrides:
      `getCause` in class `Throwable`

  - ### printStackTrace

    public void printStackTrace()
    Overrides:
      `printStackTrace` in class `Throwable`