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("http://www.reportmill.com/cgi-bin/SendMail.py"); er.setToAddress("[email protected]") er.setInfo("MyApp Version X, Build Date: " + MyUtils.getBuildDate()); Thread.setDefaultUncaughtExceptionHandler(er);
  • Constructor Details

    • ExceptionReporter

      public ExceptionReporter(String aName)
      Creates a new ExceptionReporter with given app name.
  • Method Details

    • getAppName

      public String getAppName()
      Returns the app name.
    • getURL

      public String getURL()
      Returns the URL.
    • setURL

      public void setURL(String aURL)
      Sets the URL.
    • getToAddress

      public String getToAddress()
      Returns the user to send mail to.
    • setToAddress

      public void setToAddress(String aStr)
      Sets the user to send mail to.
    • getInfo

      public String getInfo()
      Returns the info string.
    • setInfo

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

      public void uncaughtException(Thread t, Throwable aThrowable)
      Creates a new exception reporter for given throwable.
      Specified by:
      uncaughtException in interface Thread.UncaughtExceptionHandler
    • sendException

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

      public static String sendMail(String toAddr, String fromAddr, String aSubj, String aBody, String aURL)
      Sends an email with given from, to, subject, body and SendMail url.