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(<url_to_some_SendMail.py>); er.setToAddress("[email protected]") er.setInfo("MyApp Version X, Build Date: " + MyUtils.getBuildDate()); Thread.setDefaultUncaughtExceptionHandler(er);
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);
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Returns the app info string.static String
Returns the app name.protected void
resetUI()
Reset UI.protected void
Respond UI.void
Send exception via SendMail.py at reportmill.com.static void
setAppInfo
(String aStr) Sets the info string.static void
setAppName
(String aStr) Sets the info string.void
showExceptionPanelForException
(Throwable aThrowable) Shows exception reporter panel for given exception string.void
showExceptionPanelForExceptionString
(String exceptionString) Shows exception reporter panel for given exception string.void
uncaughtException
(Thread t, Throwable aThrowable) UncaughtExceptionHandler method: Shows exception reporter panel for given exception.Methods inherited from class snap.view.ViewOwner
addKeyActionFilter, addKeyActionHandler, addViewEventHandler, beep, cancelReset, createUI, dispatchEventToOwner, fireActionEventForObject, getEnv, getFirstFocus, getImage, getNative, getToggleGroup, getUI, getUI, 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, 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, batchPropChange, batchPropChange, batchPropChanges, clone, fireBatchPropChanges, firePropChange, firePropChange, firePropChange, getPropDefault, getPropForName, getPropParent, getPropSet, getPropsForArchival, getPropsForArchivalExtra, getPropsString, getPropValue, initProps, isPropDefault, processArchivedNode, processPropChange, processUnarchivedNode, removeDeepChangeListener, removePropChangeListener, removePropChangeListener, setPropsString, setPropValue, setPropValues, toString, toStringProps
-
Constructor Details
-
ExceptionReporter
public ExceptionReporter()Constructor with given app name.
-
-
Method Details
-
getAppName
Returns the app name. -
setAppName
Sets the info string. -
getAppInfo
Returns the app info string. -
setAppInfo
Sets the info string. -
uncaughtException
UncaughtExceptionHandler method: Shows exception reporter panel for given exception.- Specified by:
uncaughtException
in interfaceThread.UncaughtExceptionHandler
-
showExceptionPanelForException
Shows exception reporter panel for given exception string. -
showExceptionPanelForExceptionString
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. -
respondUI
Respond UI.
-