com.google.analytics.tracking.android
Class ExceptionReporter
java.lang.Object
com.google.analytics.tracking.android.ExceptionReporter
- All Implemented Interfaces:
- java.lang.Thread.UncaughtExceptionHandler
public class ExceptionReporter
- extends java.lang.Object
- implements java.lang.Thread.UncaughtExceptionHandler
Used to catch any uncaught exceptions and report them to Google Analytics.
This class will call ServiceManager.dispatch()
after calling
Tracker.trackException(java.lang.String, boolean)
.
The exact message reported is determined by the ExceptionParser
set
via the setExceptionParser(com.google.analytics.tracking.android.ExceptionParser)
method. See StandardExceptionParser
for an example of an implementation of ExceptionParser
.
All exceptions reported via this class will be reported as fatal exceptions.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExceptionReporter
public ExceptionReporter(Tracker tracker,
ServiceManager serviceManager,
java.lang.Thread.UncaughtExceptionHandler originalHandler)
- Parameters:
tracker
- an active Tracker
instanceserviceManager
- an active ServiceManager
instanceoriginalHandler
- the current DefaultUncaughtExceptionHandler
getExceptionParser
public ExceptionParser getExceptionParser()
setExceptionParser
public void setExceptionParser(ExceptionParser exceptionParser)
uncaughtException
public void uncaughtException(java.lang.Thread t,
java.lang.Throwable e)
- Specified by:
uncaughtException
in interface java.lang.Thread.UncaughtExceptionHandler