public class DefaultErrorHandler extends java.lang.Object implements ErrorHandler, java.io.Serializable
ErrorHandler
interface. This implementation simply dumps messages.Modifier and Type | Field and Description |
---|---|
static int |
SHOW_ALL
Debug Mode: SHOW_ALL Show all messages.
|
static int |
SHOW_ERROR
Debug Mode: SHOW_ERROR Show error messages.
|
static int |
SHOW_LOG
Debug Mode: SHOW_LOG Show log messages.
|
static int |
SHOW_NONE
Debug Mode: SHOW_NONE Show no debug messages.
|
static int |
SHOW_TRACE
Debug Mode: SHOW_TRACE Show trace messages.
|
Constructor and Description |
---|
DefaultErrorHandler() |
Modifier and Type | Method and Description |
---|---|
void |
error(java.lang.Throwable e, java.lang.String _class, java.lang.String routine)
Responds to trapped exceptions.
|
protected java.lang.String |
getDate() |
int |
getDebugMode()
Retrieves the debug mode for the error handler.
|
void |
log(java.lang.String message, java.lang.String _class, java.lang.String routine)
Responds to abnormal conditions that are not trapped exceptions.
|
void |
resetDebugMode()
Reset the debug mode settings of the DefaultErrorHandler back to the default settings.
|
void |
setDebugMode(int mode)
Specifies the debug mode for the error handler.
|
void |
trace(java.lang.String message, java.lang.String _class, java.lang.String routine)
Responds to trace messages.
|
public static final int SHOW_NONE
public static final int SHOW_ERROR
public static final int SHOW_LOG
public static final int SHOW_TRACE
public static final int SHOW_ALL
public void setDebugMode(int mode)
mode
- The debug mode for the error handler. Valid values are SHOW_TRACE, SHOW_LOG, SHOW_ERROR, SHOW_NONE , and SHOW_ALL.public int getDebugMode()
public void resetDebugMode()
public void error(java.lang.Throwable e, java.lang.String _class, java.lang.String routine)
error
in interface ErrorHandler
e
- The trapped exception._class
- The name of the class in which the exception was caught.routine
- The name of the routine in which the exception was caught.public void log(java.lang.String message, java.lang.String _class, java.lang.String routine)
log
in interface ErrorHandler
message
- A message that identifies the problem._class
- The name of the class in which the problem occurred.routine
- The name of the routine in which the problem occurred.public void trace(java.lang.String message, java.lang.String _class, java.lang.String routine)
trace
in interface ErrorHandler
message
- A message that describes the accomplishment._class
- The name of the class in which the accomplishment occurred.routine
- The name of the routine in which the accomplishment occurred.protected java.lang.String getDate()