java.lang.Object | |
↳ | com.google.android.gms.analytics.StandardExceptionParser |
This class will capture the root cause (last in a chain of causes) Throwable
and report the exception type, class name, method name and thread
name.
This class will attempt to report a class and method name that is relevant to
the application if at all possible. It does this by finding the root cause
Throwable
, then checking each StackTraceElement
for a class
that is in a package list created by setIncludedPackages(Context, Collection
, starting
with the first StackTraceElement
.
The String
returned by getDescription(String, Throwable)
will take the form
Exception class(@classname:methodname){threadname}.
See getBestStackTraceElement(Throwable)
and setIncludedPackages(Context, Collection
for
details.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return a short description of a
Throwable suitable for
reporting to Google Analytics. | |||||||||||
Sets the list of packages considered relevant to the list of packages in
the
Context and the list of packages provided in the
input parameter additionalPackages . |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the first
StackTraceElement found that has a className in
any packageName found in includedPackages . | |||||||||||
Get the root cause of the input
Throwable . | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Parameters | |
---|---|
context |
Context
|
additionalPackages |
Collection
|
Sets the list of packages considered relevant to the list of packages in
the Context
and the list of packages provided in the
input parameter additionalPackages
. Either parameter can be null.
Any package names stored from a previous call to this method will be cleared.
Parameters | |
---|---|
context |
Context :
any Context for the application |
additionalPackages |
Collection :
a collection of additional package names to add
|
Return the first StackTraceElement
found that has a className in
any packageName found in includedPackages
. If none have a
className in any packageName found in includedPackages
, return
the first StackTraceElement
found. If the Throwable
does
not contain any StackTraceElement
s, return null.
Parameters | |
---|---|
t |
Throwable
|
Returns | |
---|---|
StackTraceElement |
Given input of a Throwable
, a StackTraceElement
and the
name of the Thread
, return a String
describing the
Throwable
and the name of the Class
and method where the
Throwable
happened. The String
returned will also have
the name of the thread appended (as provided in the input parameter
threadName).
Parameters | |
---|---|
cause |
Throwable
|
element |
StackTraceElement
|
threadName |
String
|
Returns | |
---|---|
String |