|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjimm.evote.ErrorHandler
A simple error message handler.
Though using Log4J makes perfect sense, I didn't want to add any dependencies to this application code.
Constructor Summary | |
ErrorHandler()
|
Method Summary | |
static void |
error(java.lang.Exception e)
Prints an exception's error message; does not exit. |
static void |
error(java.lang.Exception e,
boolean exit)
Prints an exception's error message to System.err and exits if
exit is true . |
static void |
error(java.lang.String msg)
Prints msg to System.err ; does not exit. |
static void |
error(java.lang.String msg,
boolean exit)
Prints msg to System.err and exits if
exit is true . |
static void |
error(java.lang.String msg,
java.lang.Exception e)
Prints msg and an exception's error message to System.err ; does not exit. |
static void |
error(java.lang.String msg,
java.lang.Exception e,
boolean exit)
Prints msg and an exception's error message to System.err and exits if exit is true . |
static void |
error(java.lang.String msg,
OperationStatus status)
Prints optional msg and printable version of status; does not exit. |
static void |
error(java.lang.String msg,
OperationStatus status,
boolean exit)
Prints optional msg and printable version of status and optionally exits. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ErrorHandler()
Method Detail |
public static void error(java.lang.Exception e)
e
- an exceptionpublic static void error(java.lang.Exception e, boolean exit)
System.err
and exits if
exit is true
.
e
- an exceptionexit
- if true
, exits after printing msgpublic static void error(java.lang.String msg)
System.err
; does not exit.
msg
- an error messagepublic static void error(java.lang.String msg, boolean exit)
System.err
and exits if
exit is true
.
msg
- an error messageexit
- if true
, exits after printing msgpublic static void error(java.lang.String msg, java.lang.Exception e)
System.err
; does not exit.
msg
- an error messagee
- an exceptionpublic static void error(java.lang.String msg, java.lang.Exception e, boolean exit)
System.err
and exits if exit is true
.
msg
- an error messagee
- an exceptionexit
- if true
, exits after printing msgpublic static void error(java.lang.String msg, OperationStatus status)
msg
- an optional message; may be null
status
- a database operation status codepublic static void error(java.lang.String msg, OperationStatus status, boolean exit)
msg
- an optional message; may be null
status
- a database operation status codeexit
- if true
, exits after printing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |