|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.rolandkrueger.roklib.util.ApplicationError
public class ApplicationError
This class summarizes all information that is necessary to appropriately
respond to an error situation. Objects of this class are passed to classes
implementing the ApplicationMessageHandler
interface.
ApplicationMessageHandler
Nested Class Summary | |
---|---|
static class |
ApplicationError.ErrorType
Defines the seriousness of an error. |
Field Summary | |
---|---|
private Throwable |
mCause
|
private String |
mDescription
|
private ApplicationError.ErrorType |
mType
|
Constructor Summary | |
---|---|
protected |
ApplicationError()
Default constructor that initializes the error level with ApplicationError.ErrorType.UNCRITICAL . |
protected |
ApplicationError(ApplicationError.ErrorType type)
Constructor for setting the error level. |
|
ApplicationError(String description)
Constructor for setting the description of an error. |
|
ApplicationError(String description,
ApplicationError.ErrorType type)
Constructor for setting both the description of an error and its type. |
|
ApplicationError(String description,
Throwable cause)
Constructor for setting both the description of an error and its cause. |
|
ApplicationError(String description,
Throwable cause,
ApplicationError.ErrorType type)
Constructor for setting the description, the cause and the type of the error. |
Method Summary | |
---|---|
Throwable |
getCause()
Returns the exception that caused this error. |
String |
getDescription()
Returns the error message. |
ApplicationError.ErrorType |
getType()
Returns the error level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String mDescription
private Throwable mCause
private ApplicationError.ErrorType mType
Constructor Detail |
---|
protected ApplicationError()
ApplicationError.ErrorType.UNCRITICAL
.
protected ApplicationError(ApplicationError.ErrorType type)
type
- seriousness of the errorpublic ApplicationError(String description)
ApplicationError.ErrorType.UNCRITICAL
.
description
- an error description. This can later be used as the error message.public ApplicationError(String description, Throwable cause)
ApplicationError
object. The error's level defaults to
ApplicationError.ErrorType.UNCRITICAL
.
description
- an error description. This can later be used as the error message.cause
- exception that caused this error to be createdpublic ApplicationError(String description, ApplicationError.ErrorType type)
description
- an error description. This can later be used as the error message.type
- seriousness of the errorpublic ApplicationError(String description, Throwable cause, ApplicationError.ErrorType type)
description
- an error description. This can later be used as the error message.cause
- exception that caused this error to be createdtype
- seriousness of the errorApplicationError(String, Throwable)
Method Detail |
---|
public String getDescription()
public Throwable getCause()
null
if no such information
was providedApplicationError(String, Throwable)
public ApplicationError.ErrorType getType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |