public class LoggedException
extends java.lang.RuntimeException
Constructor and Description |
---|
LoggedException()
Create an exception with an empty message.
|
LoggedException(java.lang.String message) |
LoggedException(java.lang.String message,
java.lang.Throwable cause) |
LoggedException(java.lang.Throwable cause) |
Modifier and Type | Method and Description |
---|---|
static void |
logException(java.lang.Exception e,
java.lang.String threadName,
java.util.logging.Level level)
Logs an exception.
|
static void |
logExceptionSevere(java.lang.Exception e,
java.lang.String threadName)
Logs an exception at the SEVERE level.
|
static void |
logExceptionSevere(java.lang.Exception e,
java.lang.String message,
java.lang.String threadName)
Logs an exception at the SEVERE level, also logs an additional message.
|
static void |
logExceptionWarning(java.lang.Exception e,
java.lang.String threadName)
Logs an exception at the WARNING level.
|
static void |
logExceptionWarning(java.lang.Exception e,
java.lang.String message,
java.lang.String threadName)
Logs an exception at the WARNING level, also logs an additional message.
|
static void |
setExceptionLogging(boolean log)
Turns exception logging on or off.
|
public LoggedException()
public LoggedException(java.lang.Throwable cause)
cause
- the cause of this exception. The message is cause.toString()
.public LoggedException(java.lang.String message, java.lang.Throwable cause)
cause
- the cause of this exception.message
- the cause is not added to the message by this constructor.public LoggedException(java.lang.String message)
message
- a message for this exception.public static void setExceptionLogging(boolean log)
log
- if true, exception logging is on. If false, exceptions will not be logged, though
they will still kill the JVM if they are not caught.public static void logExceptionSevere(java.lang.Exception e, java.lang.String message, java.lang.String threadName)
public static void logExceptionWarning(java.lang.Exception e, java.lang.String message, java.lang.String threadName)
public static void logExceptionSevere(java.lang.Exception e, java.lang.String threadName)
public static void logExceptionWarning(java.lang.Exception e, java.lang.String threadName)
public static void logException(java.lang.Exception e, java.lang.String threadName, java.util.logging.Level level)
level
- the Level
to log the exception at.java.util.logging.Level.