|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.io.IOException org.norther.tammi.core.base.LogException
public class LogException
A generic exception supporting consistent run-time error management and
configurable logging of run-time exceptions. Every exception to be logged by
the server should be thrown as a LogException
. An exception to
be reported to the user should be thrown as a UserException
.
Dynamic data can be added to messages as arguments. The first argument is always the date and time of the exception, and the last one the class name and message of an optional cause throwable. Other arguments can be given as parameters to the constructors of the exception. The following parameters are supported:
Object
The exception maintains a log of thrown exceptions. The properties of the log can be configured separately (not available yet). The static log method can be used to log messages without throwing exceptions.
Constructor Summary | |
---|---|
LogException(Log.Level level,
String message)
Constructs an exception at the specified severity level with a message. |
|
LogException(Log.Level level,
String message,
Object argument)
Constructs an exception at the specified severity level with a message and argument. |
|
LogException(Log.Level level,
String message,
Object argument,
Throwable cause)
Constructs an exception at the specified severity level with a message, argument and cause. |
|
LogException(Log.Level level,
String message,
Throwable cause)
Constructs an exception at the specified severity level with a message and cause. |
|
LogException(Log.Level level,
Throwable cause)
Constructs an exception at the specified severity level with a cause. |
|
LogException(String message)
Constructs an exception with a message. |
|
LogException(String message,
Object argument)
Constructs an exception with a message and argument. |
|
LogException(String message,
Object argument,
Throwable cause)
Constructs an exception with a message, argument and cause. |
|
LogException(String message,
Throwable cause)
Constructs an exception with a message and cause. |
|
LogException(Throwable cause)
Constructs an exception with a cause. |
Method Summary | |
---|---|
boolean |
equals(Object other)
|
Object |
getArgument()
Gets the argument in the exception. |
Log.Level |
getLevel()
Gets the level of the exception. |
String |
getLocalizedMessage()
|
String |
getLocalizedMessage(Object... localization)
Gets a localized message for the specified localization. |
protected Log |
getMessageLog()
Gets the message log. |
long |
getTime()
Gets the time of the exception. |
int |
hashCode()
|
protected void |
setLevel(Log.Level level)
Sets the level of the exception. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LogException(String message)
message
- a message.public LogException(Throwable cause)
cause
- a cause throwable.public LogException(String message, Throwable cause)
message
- a message.cause
- a cause throwable.public LogException(String message, Object argument)
message
- a message.argument
- an argument.public LogException(String message, Object argument, Throwable cause)
message
- a message.argument
- an argument.cause
- a cause throwable.public LogException(Log.Level level, String message)
level
- the level.message
- a message.public LogException(Log.Level level, Throwable cause)
level
- the level.cause
- a cause throwable.public LogException(Log.Level level, String message, Throwable cause)
level
- the level.message
- a message.cause
- a cause throwable.public LogException(Log.Level level, String message, Object argument)
level
- the level.message
- a message.argument
- an argument.public LogException(Log.Level level, String message, Object argument, Throwable cause)
level
- the level.message
- a message.argument
- an argument.cause
- a cause throwable.Method Detail |
---|
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String getLocalizedMessage()
getLocalizedMessage
in class Throwable
public String getLocalizedMessage(Object... localization)
localization
- the localization.
public long getTime()
public Log.Level getLevel()
public Object getArgument()
protected void setLevel(Log.Level level)
level
- the level.protected Log getMessageLog()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |