com.preemptive.instrumentation
Class ExceptionHandler

java.lang.Object
  extended by com.preemptive.instrumentation.ExceptionHandler

public final class ExceptionHandler
extends Object

Utility methods to added uncaught exception handlers to the application or the thread. These handlers can automatically displays a dialog and request the information be sent to PA or just sent the exception message without interaction.

Additional methods are provided for displaying the dialog box separately.


Method Summary
static void addDefaultUncaughtExceptionDialog(Object contextObject)
          Add an exception handler to the application that displays a dialog that allows the user to send an exception report to PA.
static void addDefaultUncaughtExceptionDialog(Object contextObject, BinaryInfo binary)
          Add an exception handler to the application that displays a dialog that allows the user to send an exception report to PA.
static void addDefaultUncaughtExceptionHandler()
          Add an exception handler to the application that sends an exception report to PA.
static void addDefaultUncaughtExceptionHandler(BinaryInfo binary)
          Add an exception handler to the application that sends an exception report to PA.
static void addThreadUncaughtExceptionDialog(Object contextObject)
          Add an exception handler to the current thread that displays a dialog that allows the user to send an exception report to PA.
static void addThreadUncaughtExceptionDialog(Object contextObject, BinaryInfo binary)
          Add an exception handler to the current thread that displays a dialog that allows the user to send an exception report to PA.
static void addThreadUncaughtExceptionHandler()
          Add an exception handler to the current thread that sends an exception report to PA.
static void addThreadUncaughtExceptionHandler(BinaryInfo binary)
          Add an exception handler to the current thread that sends an exception report to PA.
static void showDialog(Throwable exception)
          Display an exception dialog that allows the user to send an uncaught exception report to PA.
static void showDialog(Throwable exception, int type, Object contextObject)
          Display an exception dialog that allows the user to send an exception report to PA.
static void showDialog(Throwable exception, int type, Object contextObject, BinaryInfo binary, Properties properties)
          Display an exception dialog that allows the user to send an exception report to PA.
static void showDialog(Throwable exception, int type, Object contextObject, Properties properties)
          Display an exception dialog that allows the user to send an exception report to PA.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

showDialog

public static void showDialog(Throwable exception)
Display an exception dialog that allows the user to send an uncaught exception report to PA. The user can add context and contact information about the error. If the exception is an Error then the application will be terminated.

Parameters:
exception - the exception to be reported

showDialog

public static void showDialog(Throwable exception,
                              int type,
                              Object contextObject)
Display an exception dialog that allows the user to send an exception report to PA. The user can add context and contact information about the error. If the exception is an uncaught Error then the application will be terminated.

Parameters:
exception - the exception to be reported
type - the context type of the exception:
contextObject - a context object typically a UI component used to determine the location to display the dialog. May be null.

showDialog

public static void showDialog(Throwable exception,
                              int type,
                              Object contextObject,
                              Properties properties)
Display an exception dialog that allows the user to send an exception report to PA. The user can add context and contact information about the error. If the exception is an uncaught Error then the application will be terminated.

Parameters:
exception - the exception to be reported
type - the context type of the exception:
contextObject - a context object typically a UI component used to determine the location to display the dialog. May be null.
properties - properties to be sent with the exception report. May be null.

showDialog

public static void showDialog(Throwable exception,
                              int type,
                              Object contextObject,
                              BinaryInfo binary,
                              Properties properties)
Display an exception dialog that allows the user to send an exception report to PA. The user can add context and contact information about the error. If the exception is an uncaught Error then the application will be terminated.

Parameters:
exception - the exception to be reported
type - the context type of the exception:
contextObject - a context object typically a UI component used to determine the location to display the dialog. May be null.
binary - information about the application. May be null
properties - properties to be sent with the exception report. May be null.

addThreadUncaughtExceptionDialog

public static void addThreadUncaughtExceptionDialog(Object contextObject)
Add an exception handler to the current thread that displays a dialog that allows the user to send an exception report to PA. The user can add context and contact information about the error. If the exception is an Error then the application will be terminated.

Parameters:
contextObject - a context object typically a UI component used to determine the location to display the dialog. May be null.

addThreadUncaughtExceptionDialog

public static void addThreadUncaughtExceptionDialog(Object contextObject,
                                                    BinaryInfo binary)
Add an exception handler to the current thread that displays a dialog that allows the user to send an exception report to PA. The user can add context and contact information about the error. If the exception is an Error then the application will be terminated.

Parameters:
contextObject - a context object typically a UI component used to determine the location to display the dialog. May be null.
binary - information about the application. May be null

addThreadUncaughtExceptionHandler

public static void addThreadUncaughtExceptionHandler()
Add an exception handler to the current thread that sends an exception report to PA. If the exception is an Error then the application will be terminated.


addThreadUncaughtExceptionHandler

public static void addThreadUncaughtExceptionHandler(BinaryInfo binary)
Add an exception handler to the current thread that sends an exception report to PA. If the exception is an Error then the application will be terminated.

Parameters:
binary - information about the application. May be null

addDefaultUncaughtExceptionDialog

public static void addDefaultUncaughtExceptionDialog(Object contextObject)
Add an exception handler to the application that displays a dialog that allows the user to send an exception report to PA. The user can add context and contact information about the error. If the exception is an Error then the application will be terminated.

Parameters:
contextObject - a context object typically a UI component used to determine the location to display the dialog. May be null.

addDefaultUncaughtExceptionDialog

public static void addDefaultUncaughtExceptionDialog(Object contextObject,
                                                     BinaryInfo binary)
Add an exception handler to the application that displays a dialog that allows the user to send an exception report to PA. The user can add context and contact information about the error. If the exception is an Error then the application will be terminated.

Parameters:
contextObject - a context object typically a UI component used to determine the location to display the dialog. May be null.
binary - information about the application. May be null

addDefaultUncaughtExceptionHandler

public static void addDefaultUncaughtExceptionHandler()
Add an exception handler to the application that sends an exception report to PA. If the exception is an Error then the application will be terminated.


addDefaultUncaughtExceptionHandler

public static void addDefaultUncaughtExceptionHandler(BinaryInfo binary)
Add an exception handler to the application that sends an exception report to PA. If the exception is an Error then the application will be terminated.

Parameters:
binary - information about the application. May be null


Copyright © 2013 PreEmptive Solutions, LLC. All Rights Reserved.