public class Error extends java.lang.Object implements JsonStream.Streamable
This object is made available in BeforeNotify callbacks, so you can inspect and modify it before it is delivered to Bugsnag.
BeforeNotify| Modifier and Type | Method and Description |
|---|---|
void |
addToTab(java.lang.String tabName,
java.lang.String key,
java.lang.Object value)
Add additional diagnostic information to send with this Error.
|
void |
clearTab(java.lang.String tabName)
Remove a tab of app-wide diagnostic information from this Error
|
java.lang.String |
getContext()
Get the context associated with this Error.
|
java.lang.Throwable |
getException()
The exception which triggered this Error report.
|
java.lang.String |
getExceptionMessage()
Get the message from the exception contained in this Error report.
|
java.lang.String |
getExceptionName()
Get the class name from the exception contained in this Error report.
|
MetaData |
getMetaData()
Get any additional diagnostic MetaData currently attached to this Error.
|
Severity |
getSeverity()
Get the Severity of this Error.
|
com.bugsnag.android.User |
getUser() |
void |
setContext(java.lang.String context)
Override the context sent to Bugsnag with this Error.
|
void |
setGroupingHash(java.lang.String groupingHash)
Set a custom grouping hash to use when grouping this Error on the
Bugsnag dashboard.
|
void |
setMetaData(MetaData metaData)
Set additional diagnostic MetaData to send with this Error.
|
void |
setSeverity(Severity severity)
Set the Severity of this Error.
|
void |
setUser(java.lang.String id,
java.lang.String email,
java.lang.String name)
Set user information associated with this Error
|
void |
setUserEmail(java.lang.String email)
Set user email address associated with this Error
|
void |
setUserId(java.lang.String id)
Set user id associated with this Error
|
void |
setUserName(java.lang.String name)
Set user name associated with this Error
|
void |
toStream(JsonStream writer) |
public void toStream(JsonStream writer) throws java.io.IOException
toStream in interface JsonStream.Streamablejava.io.IOExceptionpublic void setContext(java.lang.String context)
context - what was happening at the time of a crashpublic java.lang.String getContext()
public void setGroupingHash(java.lang.String groupingHash)
groupingHash - a string to use when grouping errorspublic void setSeverity(Severity severity)
severity - the severity of this errorSeveritypublic void setUser(java.lang.String id,
java.lang.String email,
java.lang.String name)
id - the id of the useremail - the email address of the username - the name of the userpublic com.bugsnag.android.User getUser()
public void setUserId(java.lang.String id)
id - the id of the userpublic void setUserEmail(java.lang.String email)
email - the email address of the userpublic void setUserName(java.lang.String name)
name - the name of the userpublic void addToTab(java.lang.String tabName,
java.lang.String key,
java.lang.Object value)
tabName - the dashboard tab to add diagnostic data tokey - the name of the diagnostic informationvalue - the contents of the diagnostic informationpublic void clearTab(java.lang.String tabName)
tabName - the dashboard tab to remove diagnostic data frompublic MetaData getMetaData()
public void setMetaData(MetaData metaData)
metaData - additional diagnostic data to send with this ErroraddToTab(java.lang.String, java.lang.String, java.lang.Object),
getMetaData()public java.lang.String getExceptionName()
public java.lang.String getExceptionMessage()
public java.lang.Throwable getException()