com.groiss.util
Class ApplicationException

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

public class ApplicationException
extends java.lang.RuntimeException
implements java.io.Serializable, TopLevelException

Class for Exceptions thrown in the application.

See Also:
Serialized Form

Field Summary
protected  boolean allowHTMLMessage
           
protected  java.lang.Object[] arguments
           
protected  ErrorFormatter ef
           
protected  int exceptionNumber
           
protected  boolean isWarning
           
 
Constructor Summary
ApplicationException(int errnum)
          Construct an ApplicationException with an exception number
ApplicationException(int errnum, java.lang.Object[] args)
           
ApplicationException(int errnum, java.lang.Object[] args, java.lang.Throwable cause)
          Construct an ApplicationException with an exception number, parameters for that exception and the causing Throwable
ApplicationException(int errnum, java.lang.String msg, java.lang.Throwable cause)
           
ApplicationException(int errnum, java.lang.Throwable cause)
           
ApplicationException(Resource resource, int errnum)
           
ApplicationException(Resource resource, int errnum, java.lang.Object[] args)
           
ApplicationException(Resource resource, int errnum, java.lang.Object[] args, java.lang.Throwable cause)
           
ApplicationException(Resource resource, int errnum, java.lang.String msg, java.lang.Throwable cause)
           
ApplicationException(Resource resource, int errnum, java.lang.Throwable cause)
           
ApplicationException(java.lang.String message)
          Construct an ApplicationException with a message.
ApplicationException(java.lang.String message, java.lang.Throwable cause)
          Construct an ApplicationException with a message and a Throwable.
ApplicationException(java.lang.Throwable cause)
          Construct an ApplicationException with a Throwable
 
Method Summary
 boolean allowHTMLMessage()
           
 java.lang.Object[] getArgs()
           
 int getErrnum()
           
 ErrorFormatter getErrorFormatter()
          Returns the error formatter for this exception.
 java.lang.Throwable getException()
          Returns an inner excpetion, null if there is none.
 java.lang.String getMessage()
           
 java.lang.String getOptMessage()
           
 boolean isWarning()
           
protected  void log()
           
 void setAllowHTMLMessage(boolean allowHTMLMessage)
          set to true to allow html-formatted error-messages, false by default
 void setErrorFormatter(ErrorFormatter ef)
          Set the formatter for formatting the error page.
 void setWarning(boolean warning)
          Set the exception type to 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

ef

protected ErrorFormatter ef

exceptionNumber

protected int exceptionNumber

arguments

protected java.lang.Object[] arguments

isWarning

protected boolean isWarning

allowHTMLMessage

protected boolean allowHTMLMessage
Constructor Detail

ApplicationException

public ApplicationException(int errnum)
Construct an ApplicationException with an exception number


ApplicationException

public ApplicationException(Resource resource,
                            int errnum)

ApplicationException

public ApplicationException(int errnum,
                            java.lang.Object[] args)

ApplicationException

public ApplicationException(Resource resource,
                            int errnum,
                            java.lang.Object[] args)

ApplicationException

public ApplicationException(int errnum,
                            java.lang.Object[] args,
                            java.lang.Throwable cause)
Construct an ApplicationException with an exception number, parameters for that exception and the causing Throwable


ApplicationException

public ApplicationException(Resource resource,
                            int errnum,
                            java.lang.Object[] args,
                            java.lang.Throwable cause)

ApplicationException

public ApplicationException(int errnum,
                            java.lang.String msg,
                            java.lang.Throwable cause)

ApplicationException

public ApplicationException(Resource resource,
                            int errnum,
                            java.lang.String msg,
                            java.lang.Throwable cause)

ApplicationException

public ApplicationException(int errnum,
                            java.lang.Throwable cause)

ApplicationException

public ApplicationException(Resource resource,
                            int errnum,
                            java.lang.Throwable cause)

ApplicationException

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


ApplicationException

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


ApplicationException

public ApplicationException(java.lang.Throwable cause)
Construct an ApplicationException with a Throwable

Method Detail

getArgs

public java.lang.Object[] getArgs()

getErrnum

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

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.

getException

public java.lang.Throwable getException()
Description copied from interface: TopLevelException
Returns an inner excpetion, null if there is none.

Specified by:
getException in interface TopLevelException

getMessage

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

getOptMessage

public java.lang.String getOptMessage()

isWarning

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

log

protected void log()

setErrorFormatter

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

Parameters:
ef -

setWarning

public void setWarning(boolean warning)
Set the exception type to warning. This can be interpreted in the GUI to show the error message differently.

Specified by:
setWarning in interface TopLevelException

allowHTMLMessage

public boolean allowHTMLMessage()

setAllowHTMLMessage

public void setAllowHTMLMessage(boolean allowHTMLMessage)
set to true to allow html-formatted error-messages, false by default

Parameters:
allowHTMLMessage -


@enterprise 8.0.22989 Copyright © 2001-2017 Groiss Informatics GmbH. All Rights Reserved.