Package chemaxon.util
Class ErrorHandler
java.lang.Object
chemaxon.util.ErrorHandler
- Direct Known Subclasses:
ConnectionHandler
,JChemSearch
,UpdateHandler
An abstract ancestor of JavaBeans that enable exception handling in
different environments.
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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
protected Throwable
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Throws the exception stored in the object.void
Throws the exception stored in the object.int
getError()
Getter for property error.Getter for property errorMessage.Getter for property exception.Getter for property stackTrace.
-
Field Details
-
NO_ERROR
public static final int NO_ERROR- See Also:
-
UNIDENTIFIED_ERROR
public static final int UNIDENTIFIED_ERROR- See Also:
-
MAX_SEARCH_FREQUENCY_EXCEEDED_ERROR
public static final int MAX_SEARCH_FREQUENCY_EXCEEDED_ERROR- See Also:
-
DATABASE_SEARCH_ERROR
public static final int DATABASE_SEARCH_ERROR- See Also:
-
MOL_FORMAT_ERROR
public static final int MOL_FORMAT_ERROR- See Also:
-
IO_ERROR
public static final int IO_ERROR- See Also:
-
CLASS_NOT_FOUND_ERROR
public static final int CLASS_NOT_FOUND_ERROR- See Also:
-
INSTANTIATION_ERROR
public static final int INSTANTIATION_ERROR- See Also:
-
ILLEGAL_ACCESS_ERROR
public static final int ILLEGAL_ACCESS_ERROR- See Also:
-
SQL_ERROR
public static final int SQL_ERROR- See Also:
-
exception
-
-
Constructor Details
-
ErrorHandler
public ErrorHandler()
-
-
Method Details
-
getException
Getter for property exception.- Returns:
- Value of property exception that is stored by the class.
-
getError
public int getError()Getter for property error.- Returns:
- Value of property error.
-
getErrorMessage
Getter for property errorMessage.- Returns:
- Value of property errorMessage.
-
getStackTrace
Getter for property stackTrace.- Returns:
- Value of property stackTrace.
-
checkError
Throws the exception stored in the object.- Throws:
Throwable
- the exception stored
-
checkException
Throws the exception stored in the object. Needed because Tomcat errorpages don't handle errors of typeThrowable
that are not inheritors ofException
.- Throws:
Exception
- the exception stored, boxed as Exception
-