|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jimm.datavision.ErrorHandler
public class ErrorHandler
This class provides static methods for displaying error messages. It displays error messages to System.err. When the GUI is being used it displays error messages in dialog boxes as well.
The only shortcoming is that you have to explicitly tell this class whether to use the GUI or not.
This class is also used by other parts of the system to determine if the report is being run with or without a GUI.
Field Summary | |
---|---|
protected static int |
MAX_MESSAGE_WIDTH
|
protected static boolean |
useGUI
|
Constructor Summary | |
---|---|
ErrorHandler()
|
Method Summary | |
---|---|
static void |
error(java.lang.String message)
Displays an error message. |
static void |
error(java.lang.String message,
java.lang.String windowTitle)
Displays an error message with the given window title. |
static void |
error(java.lang.String message,
java.lang.Throwable t)
Displays an error message and an exception (actually a Throwable ) Both arguments are optionally null . |
static void |
error(java.lang.String message,
java.lang.Throwable t,
java.lang.String windowTitle)
Displays an error message and an exception (actually a Throwable ) with the given window title. |
static void |
error(java.lang.Throwable t)
Displays an exception (actually a Throwable ). |
static void |
error(java.lang.Throwable t,
java.lang.String windowTitle)
Displays an error message and an exception (actually a Throwable ) with the given window title. |
static void |
useGUI(boolean b)
Tells the error handler routines whether to display error messages in dialog boxes or not. |
static boolean |
usingGUI()
Returns true if we've been told to use the GUI. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int MAX_MESSAGE_WIDTH
protected static boolean useGUI
Constructor Detail |
---|
public ErrorHandler()
Method Detail |
---|
public static void useGUI(boolean b)
b
- if true
, all error messages will be displayed
using a dialog box in addition to being printed on System.errpublic static boolean usingGUI()
true
if we've been told to use the GUI.
true
if we've been told to use the GUIpublic static void error(java.lang.String message)
message
- the error message; may be null
,
but that would be rather sillypublic static void error(java.lang.String message, java.lang.Throwable t)
Throwable
) Both arguments are optionally null
.
message
- the error message; may be null
t
- a throwable; may be null
public static void error(java.lang.String message, java.lang.String windowTitle)
null
.
message
- the error message; may be null
windowTitle
- a string to use as the dialog title; may be
null
public static void error(java.lang.Throwable t)
Throwable
). It may
be null
, but that would be rather silly.
t
- a throwable; may be null
public static void error(java.lang.Throwable t, java.lang.String windowTitle)
Throwable
) with the given window title. All three
arguments are optionally null
.
t
- a throwable; may be null
windowTitle
- a string to use as the dialog title; may be
null
public static void error(java.lang.String message, java.lang.Throwable t, java.lang.String windowTitle)
Throwable
) with the given window title. All three
arguments are optionally null
.
message
- the error message; may be null
t
- a throwable; may be null
windowTitle
- a string to use as the dialog title; may be
null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |