Package snap.viewx
Class ExceptionReporter
java.lang.Object
snap.props.PropObject
snap.view.ViewOwner
snap.viewx.ExceptionReporter
- All Implemented Interfaces:
Thread.UncaughtExceptionHandler
,PropChange.DoChange
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("https://www.reportmill.com/cgi-bin/SendMail.py");
er.setToAddress("[email protected]")
er.setInfo("MyApp Version X, Build Date: " + MyUtils.getBuildDate());
Thread.setDefaultUncaughtExceptionHandler(er);
-
Field Summary
Fields inherited from class snap.view.ViewOwner
Action, DragDrop, DragEnter, DragEvents, DragExit, DragGesture, DragOver, KeyEvents, KeyPress, KeyRelease, KeyType, MouseDrag, MouseEnter, MouseEvents, MouseExit, MouseMove, MousePress, MouseRelease, Showing_Prop, WinClose
Fields inherited from class snap.props.PropObject
_pcs, EMPTY_OBJECT
-
Constructor Summary
ConstructorDescriptionExceptionReporter
(String aName) Creates a new ExceptionReporter with given app name. -
Method Summary
Modifier and TypeMethodDescriptionReturns the app name.getInfo()
Returns the info string.Returns the user to send mail to.getURL()
Returns the URL.void
Send exception via SendMail.py at reportmill.com.static String
Sends an email with given from, to, subject, body and SendMail url.void
Sets the info string.void
setToAddress
(String aStr) Sets the user to send mail to.void
Sets the URL.void
uncaughtException
(Thread t, Throwable aThrowable) Shows exception reporter panel for given exception.Methods inherited from class snap.view.ViewOwner
addKeyActionFilter, addKeyActionHandler, addViewEventHandler, beep, cancelReset, createUI, createUIForClass, dispatchEventToOwner, enableEvents, fireActionEventForObject, getEnv, getFirstFocus, getImage, getNative, getToggleGroup, getUI, getUI, getUISource, getView, getView, getViewBoolValue, getViewFloatValue, getViewIntValue, getViewItems, getViewSelIndex, getViewSelItem, getViewStringValue, getViewText, getViewValue, getWindow, initShowing, initUI, initWindow, invokeResetUI, invokeRespondUI, isEventThread, isSendEventDisabled, isShowing, isUISet, isViewDisabled, isViewEnabled, isViewVisible, isWindowSet, isWindowVisible, requestFocus, resetLater, resetUI, respondUI, runDelayed, runLater, setFirstFocus, setSendEventDisabled, setShowing, setViewDisabled, setViewEnabled, setViewItems, setViewItems, setViewSelIndex, setViewSelItem, setViewText, setViewValue, setViewVisible, setWindowVisible
Methods inherited from class snap.props.PropObject
addDeepChangeListener, addPropChangeListener, addPropChangeListener, clone, firePropChange, firePropChange, firePropChange, getPropDefault, getPropForName, getPropParent, getPropSet, getPropsForArchival, getPropsForArchivalExtra, getPropsString, getPropValue, initProps, isPropDefault, processPropChange, removeDeepChangeListener, removePropChangeListener, removePropChangeListener, setPropsString, setPropValue, setPropValues, toString, toStringProps
-
Constructor Details
-
ExceptionReporter
Creates a new ExceptionReporter with given app name.
-
-
Method Details
-
getAppName
Returns the app name. -
getURL
Returns the URL. -
setURL
Sets the URL. -
getToAddress
Returns the user to send mail to. -
setToAddress
Sets the user to send mail to. -
getInfo
Returns the info string. -
setInfo
Sets the info string. -
uncaughtException
Shows exception reporter panel for given exception.- Specified by:
uncaughtException
in interfaceThread.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.
-