Package snap.viewx

Class ExceptionReporter

All Implemented Interfaces:
Thread.UncaughtExceptionHandler, PropChange.DoChange

public class ExceptionReporter extends ViewOwner implements Thread.UncaughtExceptionHandler
This class provides a UI panel to inform users that an exception was hit and send info back to developer.
Activate by setting in thread:
ExceptionReporter er = new ExceptionReporter("AppName"); er.setURL(<url_to_some_SendMail.py>); er.setToAddress("[email protected]") er.setInfo("MyApp Version X, Build Date: " + MyUtils.getBuildDate()); Thread.setDefaultUncaughtExceptionHandler(er);
  • Constructor Details

    • ExceptionReporter

      public ExceptionReporter()
      Constructor with given app name.
  • Method Details

    • getAppName

      public static String getAppName()
      Returns the app name.
    • setAppName

      public static void setAppName(String aStr)
      Sets the info string.
    • getAppInfo

      public static String getAppInfo()
      Returns the app info string.
    • setAppInfo

      public static void setAppInfo(String aStr)
      Sets the info string.
    • uncaughtException

      public void uncaughtException(Thread t, Throwable aThrowable)
      UncaughtExceptionHandler method: Shows exception reporter panel for given exception.
      Specified by:
      uncaughtException in interface Thread.UncaughtExceptionHandler
    • showExceptionPanelForException

      public void showExceptionPanelForException(Throwable aThrowable)
      Shows exception reporter panel for given exception string.
    • showExceptionPanelForExceptionString

      public void showExceptionPanelForExceptionString(String exceptionString)
      Shows exception reporter panel for given exception string.
    • sendException

      public void sendException()
      Send exception via SendMail.py at reportmill.com.
    • resetUI

      protected void resetUI()
      Reset UI.
      Overrides:
      resetUI in class ViewOwner
    • respondUI

      protected void respondUI(ViewEvent anEvent)
      Respond UI.
      Overrides:
      respondUI in class ViewOwner