Package org.geotools.swing.dialog
Class JExceptionReporter
- Object
-
- JExceptionReporter
-
public class JExceptionReporter extends Object
Displays anExceptionto the user in a modal dialog. This class is not a Swing component itself, rather it provides staticshowDialogmethods to create and display dialogs safely from any thread.Example of use:
try { // ...something awful happens in here... } catch (SomeException ex) { JExceptionReporter.showDialog(ex, "Bummer, it failed again"); }- Since:
- 8.0
- Author:
- Michael Bedward
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidshowDialog(Throwable exception)Displays an exception in a dialog where the title is the exception class name and the body of the dialog shows the exception message.static voidshowDialog(Throwable exception, String message)Displays an exception in a dialog where the title is the exception class name and the body of the dialog shows the given message.
-
-
-
Method Detail
-
showDialog
public static void showDialog(Throwable exception)
Displays an exception in a dialog where the title is the exception class name and the body of the dialog shows the exception message.It is safe to call this method from any thread.
- Parameters:
exception- exception to display
-
showDialog
public static void showDialog(Throwable exception, String message)
Displays an exception in a dialog where the title is the exception class name and the body of the dialog shows the given message.It is safe to call this method from any thread.
- Parameters:
exception- exception to displaymessage- message to display; ifnullor empty the message will be taken from the exception
-
-