public class ApplicationException extends java.lang.RuntimeException implements java.io.Serializable, TopLevelException
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
addText |
protected boolean |
allowHTMLMessage |
protected java.lang.Object[] |
arguments |
protected ErrorFormatter |
ef |
protected int |
exceptionNumber |
protected boolean |
isWarning |
Constructor and Description |
---|
ApplicationException(int errnum)
Construct an ApplicationException with an exception number.
|
ApplicationException(int errnum,
java.lang.Object[] args)
Construct an ApplicationException with an exception number and args
|
ApplicationException(int errnum,
java.lang.Object[] args,
java.lang.Throwable cause)
Construct an ApplicationException with an exception number, args and the cause exception.
|
ApplicationException(int errnum,
java.lang.String msg,
java.lang.Throwable cause)
Construct an ApplicationException with an exception number, an extra message and the cause exception.
|
ApplicationException(int errnum,
java.lang.Throwable cause)
Construct an ApplicationException with an exception number and the cause exception.
|
ApplicationException(Resource resource,
int errnum)
Construct an ApplicationException with an exception number and a resource.
|
ApplicationException(Resource resource,
int errnum,
java.lang.Object[] args)
Construct an ApplicationException with a resource, exception number and args.
|
ApplicationException(Resource resource,
int errnum,
java.lang.Object[] args,
java.lang.Throwable cause)
Construct an ApplicationException with a resource, exception number, args and the cause exception.
|
ApplicationException(Resource resource,
int errnum,
java.lang.String msg,
java.lang.Throwable cause)
Construct an ApplicationException with a resource, an exception number, an extra message and the cause exception.
|
ApplicationException(Resource resource,
int errnum,
java.lang.Throwable cause)
Construct an ApplicationException with a resource, exception number, and the cause exception.
|
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 the cause exception.
|
ApplicationException(java.lang.Throwable cause)
Construct an ApplicationException with a cause exception.
|
Modifier and Type | Method and Description |
---|---|
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 |
getMessageText()
return the plain message text without "Error" prefix and number
|
boolean |
isWarning() |
protected void |
log()
The cause is logged.
|
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.
|
protected ErrorFormatter ef
protected int exceptionNumber
protected java.lang.Object[] arguments
protected boolean isWarning
protected boolean allowHTMLMessage
protected java.lang.String addText
public ApplicationException(int errnum)
errnum
- the key in the enterprise errors resourcepublic ApplicationException(Resource resource, int errnum)
resource
- a resource containing the error messages.errnum
- the key in the given resourcepublic ApplicationException(int errnum, java.lang.Object[] args)
errnum
- the key in the given resourceargs
- message-format argumentspublic ApplicationException(Resource resource, int errnum, java.lang.Object[] args)
resource
- a resource containing the error messageserrnum
- the key in the given resourceargs
- message-format argumentspublic ApplicationException(int errnum, java.lang.Object[] args, java.lang.Throwable cause)
errnum
- the key in the given resourceargs
- message-format argumentscause
- the causing exceptionpublic ApplicationException(Resource resource, int errnum, java.lang.Object[] args, java.lang.Throwable cause)
resource
- a resource containing the error messageserrnum
- the key in the given resourceargs
- message-format argumentscause
- the causing exceptionpublic ApplicationException(int errnum, java.lang.Throwable cause)
errnum
- the key in the given resourcecause
- the causing exceptionpublic ApplicationException(Resource resource, int errnum, java.lang.Throwable cause)
resource
- a resource containing the error messageserrnum
- the key in the given resourcecause
- the causing exceptionpublic ApplicationException(java.lang.String message)
message
- the error messagepublic ApplicationException(java.lang.String message, java.lang.Throwable cause)
message
- the error messagecause
- the causing exceptionpublic ApplicationException(java.lang.Throwable cause)
cause
- the causing exceptionpublic ApplicationException(int errnum, java.lang.String msg, java.lang.Throwable cause)
errnum
- the key in the given resourcemsg
- text that is added to the message from the error resource.cause
- the causing exceptionpublic ApplicationException(Resource resource, int errnum, java.lang.String msg, java.lang.Throwable cause)
resource
- a resource containing the error messageserrnum
- the key in the given resourcemsg
- text that is added to the message from the error resource.cause
- the causing exceptionpublic java.lang.Object[] getArgs()
public int getErrnum()
getErrnum
in interface TopLevelException
public ErrorFormatter getErrorFormatter()
public java.lang.Throwable getException()
TopLevelException
getException
in interface TopLevelException
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
public java.lang.String getMessageText()
public boolean isWarning()
isWarning
in interface TopLevelException
protected void log()
public void setErrorFormatter(ErrorFormatter ef)
ef
- public void setWarning(boolean warning)
setWarning
in interface TopLevelException
public boolean allowHTMLMessage()
public void setAllowHTMLMessage(boolean allowHTMLMessage)
true
to allow html-formatted error-messages, false
by defaultallowHTMLMessage
- @enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.