public class ErrorHandler extends Object
Modifier and Type | Field and Description |
---|---|
(package private) static Icon |
ERROR_ICON
The icon to use for error messages.
|
(package private) static Localizer |
mLocalizer
The localizer of this class.
|
(package private) static JFrame |
mParent
The parent frame to use for error messages.
|
static int |
NO_PRESSED
No was pressed
|
static int |
OK_PRESSED
OK was pressed
|
static int |
SHOW_OK
Show only a OK-Button
|
static int |
SHOW_YES_NO
Show only a Yes/No-Button
|
static int |
YES_PRESSED
Yes was pressed
|
Constructor and Description |
---|
ErrorHandler() |
Modifier and Type | Method and Description |
---|---|
static void |
handle(String msg,
Throwable thr)
Handles a Throwable (Shows and logs it).
|
static int |
handle(String msg,
Throwable thr,
int messageType)
Handles a Throwable (Shows and logs it).
|
static void |
handle(TvBrowserException tvExc)
Handles a TvBrowserException (Shows and logs it).
|
static void |
setFrame(JFrame parentFrame)
Sets the parent frame to use for error messages.
|
public static final int SHOW_OK
public static final int SHOW_YES_NO
public static final int OK_PRESSED
public static final int YES_PRESSED
public static final int NO_PRESSED
static final Localizer mLocalizer
static final Icon ERROR_ICON
static JFrame mParent
public static void setFrame(JFrame parentFrame)
parentFrame
- the parent frame to use for error messages.public static void handle(TvBrowserException tvExc)
tvExc
- The exception to handle.public static void handle(String msg, Throwable thr)
msg
- The localized error message to show to the user.thr
- The exception to handle.public static int handle(String msg, Throwable thr, int messageType)
msg
- The localized error message to show to the user.thr
- The exception to handle.messageType
- The type of Window to Display:OKTV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)