Package chemaxon.util

Class ErrorHandler

  • @PublicAPI
    public abstract class ErrorHandler
    extends Object
    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.

    • Constructor Detail

      • ErrorHandler

        public ErrorHandler()
    • Method Detail

      • getException

        public Throwable getException()
        Getter for property exception.
        Value of property exception that is stored by the class.
      • getError

        public int getError()
        Getter for property error.
        Value of property error.
      • getErrorMessage

        public String getErrorMessage()
        Getter for property errorMessage.
        Value of property errorMessage.
      • getStackTrace

        public String getStackTrace()
        Getter for property stackTrace.
        Value of property stackTrace.
      • checkError

        public void checkError()
                        throws Throwable
        Throws the exception stored in the object.
        Throwable - the exception stored
      • checkException

        public void checkException()
                            throws Exception
        Throws the exception stored in the object. Needed because Tomcat errorpages don't handle errors of type Throwable that are not inheritors of Exception.
        Exception - the exception stored, boxed as Exception