@PublicAPI public abstract class ErrorHandler extends java.lang.Object
Inheritors of this class can be used as an ActiveX components. To avoid problems caused by exceptions in environments
that can not handle them, exceptions can be caught and stored using ErrorHandler. This feature is ususally applied in
methods with names like <method name>_...NE
(where NE
means "no exception").
It is also applicable in multithreading environments. Using this class as ancestor, exceptions caught in another
thread can be retrieved by overloading
.getException
Modifier and Type | Field and Description |
---|---|
static int |
CLASS_NOT_FOUND_ERROR |
static int |
DATABASE_SEARCH_ERROR |
protected java.lang.Throwable |
exception |
static int |
ILLEGAL_ACCESS_ERROR |
static int |
INSTANTIATION_ERROR |
static int |
IO_ERROR |
static int |
MAX_SEARCH_FREQUENCY_EXCEEDED_ERROR |
static int |
MOL_FORMAT_ERROR |
static int |
NO_ERROR |
static int |
SQL_ERROR |
static int |
UNIDENTIFIED_ERROR |
Constructor and Description |
---|
ErrorHandler() |
Modifier and Type | Method and Description |
---|---|
void |
checkError()
Throws the exception stored in the object.
|
void |
checkException()
Throws the exception stored in the object.
|
int |
getError()
Getter for property error.
|
java.lang.String |
getErrorMessage()
Getter for property errorMessage.
|
java.lang.Throwable |
getException()
Getter for property exception.
|
java.lang.String |
getStackTrace()
Getter for property stackTrace.
|
public static final int NO_ERROR
public static final int UNIDENTIFIED_ERROR
public static final int MAX_SEARCH_FREQUENCY_EXCEEDED_ERROR
public static final int DATABASE_SEARCH_ERROR
public static final int MOL_FORMAT_ERROR
public static final int IO_ERROR
public static final int CLASS_NOT_FOUND_ERROR
public static final int INSTANTIATION_ERROR
public static final int ILLEGAL_ACCESS_ERROR
public static final int SQL_ERROR
protected volatile java.lang.Throwable exception
public java.lang.Throwable getException()
public int getError()
public java.lang.String getErrorMessage()
public java.lang.String getStackTrace()
public void checkError() throws java.lang.Throwable
java.lang.Throwable
- the exception storedpublic void checkException() throws java.lang.Exception
Throwable
that are not
inheritors of Exception
.java.lang.Exception
- the exception stored, boxed as Exception