com.groiss.util
Class ApplicationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.groiss.util.ApplicationException
All Implemented Interfaces:
TopLevelException, java.io.Serializable
Direct Known Subclasses:
WfException

public class ApplicationException
extends java.lang.Exception
implements TopLevelException

Class for Exception thrown from Application, taken from Grand, Patterns in Java

See Also:
Serialized Form

Field Summary
protected  com.groiss.component.Application appl
           
protected  java.lang.Object[] args
           
protected  ErrorFormatter ef
           
protected  int errnum
           
protected  java.lang.Throwable exception
           
protected  boolean isWarning
           
 
Constructor Summary
ApplicationException(com.groiss.component.Application appl, int errnum)
          Construct an ApplicationException, the exception is from a list of exceptions of a specific application.
ApplicationException(com.groiss.component.Application appl, int errnum, java.lang.Object[] args)
          Construct an ApplicationException, the exception is from a list of exceptions of a specific application.
ApplicationException(com.groiss.component.Application appl, int errnum, java.lang.Object[] args, java.lang.Throwable exception)
          Construct an ApplicationException, the exception is from a list of exceptions of a specific application.
ApplicationException(com.groiss.component.Application appl, int errnum, java.lang.Throwable exception)
          Construct an ApplicationException, the exception is from a list of exceptions of a specific application.
ApplicationException(com.groiss.component.Application appl, java.lang.String msg)
          Construct an ApplicationException with an arbitrary message
ApplicationException(com.groiss.component.Application appl, java.lang.String msg, java.lang.Throwable exception)
          Construct an ApplicationException with an arbitrary message.
ApplicationException(java.lang.String msg)
          Construct an ApplicationException with an arbitrary message
ApplicationException(java.lang.String msg, java.lang.Throwable exception)
          Construct an ApplicationException with an arbitrary message and a Throwable.
 
Method Summary
 java.lang.Object[] getArgs()
           
 int getErrnum()
           
 ErrorFormatter getErrorFormatter()
          Returns the error formatter for this exception.
 java.lang.Throwable getException()
           
 java.lang.String getMessage()
           
 boolean isWarning()
           
 void setErrorFormatter(ErrorFormatter ef)
          Set the formatter for formatting the error page.
 void setWarning(boolean warning)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

exception

protected java.lang.Throwable exception

appl

protected com.groiss.component.Application appl

errnum

protected int errnum

args

protected java.lang.Object[] args

isWarning

protected boolean isWarning

ef

protected ErrorFormatter ef
Constructor Detail

ApplicationException

public ApplicationException(java.lang.String msg)
Construct an ApplicationException with an arbitrary message


ApplicationException

public ApplicationException(java.lang.String msg,
                            java.lang.Throwable exception)
Construct an ApplicationException with an arbitrary message and a Throwable.


ApplicationException

public ApplicationException(com.groiss.component.Application appl,
                            java.lang.String msg)
Construct an ApplicationException with an arbitrary message


ApplicationException

public ApplicationException(com.groiss.component.Application appl,
                            java.lang.String msg,
                            java.lang.Throwable exception)
Construct an ApplicationException with an arbitrary message.


ApplicationException

public ApplicationException(com.groiss.component.Application appl,
                            int errnum)
Construct an ApplicationException, the exception is from a list of exceptions of a specific application.


ApplicationException

public ApplicationException(com.groiss.component.Application appl,
                            int errnum,
                            java.lang.Object[] args)
Construct an ApplicationException, the exception is from a list of exceptions of a specific application.


ApplicationException

public ApplicationException(com.groiss.component.Application appl,
                            int errnum,
                            java.lang.Throwable exception)
Construct an ApplicationException, the exception is from a list of exceptions of a specific application.


ApplicationException

public ApplicationException(com.groiss.component.Application appl,
                            int errnum,
                            java.lang.Object[] args,
                            java.lang.Throwable exception)
Construct an ApplicationException, the exception is from a list of exceptions of a specific application.

Method Detail

getException

public java.lang.Throwable getException()
Specified by:
getException in interface TopLevelException

getErrnum

public int getErrnum()
Specified by:
getErrnum in interface TopLevelException

getArgs

public java.lang.Object[] getArgs()

setWarning

public void setWarning(boolean warning)
Specified by:
setWarning in interface TopLevelException

isWarning

public boolean isWarning()
Specified by:
isWarning in interface TopLevelException

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

setErrorFormatter

public void setErrorFormatter(ErrorFormatter ef)
Set the formatter for formatting the error page.

Parameters:
ef -

getErrorFormatter

public ErrorFormatter getErrorFormatter()
Returns the error formatter for this exception. If none is set, the method return null and the default ErrorFormatter defined in the system configuration will be used. If none is defined, DefaultErrorFormatter is used.

Returns:
the error formatter set for this exception.


Copyright © 2001-2006 Groiss Informatics GmbH. All Rights Reserved.