org.apache.bsf

Class BSFException


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

Field Summary

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

Constructor Summary

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

Method Summary

int
getReason()
Throwable
getTargetException()
void
printStackTrace()

Field Details

REASON_EXECUTION_ERROR

public static final int REASON_EXECUTION_ERROR
Field Value:
100

REASON_INVALID_ARGUMENT

public static final int REASON_INVALID_ARGUMENT
Field Value:
0

REASON_IO_ERROR

public static final int REASON_IO_ERROR
Field Value:
10

REASON_OTHER_ERROR

public static final int REASON_OTHER_ERROR
Field Value:
500

REASON_UNKNOWN_LANGUAGE

public static final int REASON_UNKNOWN_LANGUAGE
Field Value:
20

REASON_UNSUPPORTED_FEATURE

public static final int REASON_UNSUPPORTED_FEATURE
Field Value:
499

Constructor Details

BSFException

public BSFException(String msg)

BSFException

public BSFException(int reason,
                    String msg)

BSFException

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

Method Details

getReason

public int getReason()

getTargetException

public Throwable getTargetException()

printStackTrace

public void printStackTrace()