public final class AnalyticsCrashReport

  1. Object
  2. AnalyticsCrashReport
A crash / exception report routed to providers that advertise AnalyticsCapability.CRASH_REPORTING. This is the analytics abstraction for exception telemetry; it is distinct from the dedicated on-device crash-protection client in com.codename1.crash.

Nested types

class AnalyticsCrashReport.BuilderMutable builder for AnalyticsCrashReport.

Methods

public static AnalyticsCrashReport create(Throwable throwable, String message, boolean fatal)Creates a crash report.
public Throwable getThrowable()The captured throwable.
public String getMessage()The descriptive message.
public boolean isFatal()Whether the exception was fatal.
public Map<String, String> getCustomKeys()Optional custom key/value context attached to the report.
public AnalyticsCrashReport.Builder asBuilder()Returns a builder for adding custom keys to a base report.

Inherited methods

Method details

create

public static AnalyticsCrashReport create(Throwable throwable, String message, boolean fatal)
Creates a crash report.

Parameters

throwable Throwable
the captured exception, may be null
message String
a human readable description, may be null
fatal boolean
true if the exception terminated the application

Returns

a new crash report

getThrowable

public Throwable getThrowable()
The captured throwable.

Returns

the throwable or null

getMessage

public String getMessage()
The descriptive message.

Returns

the message or null

isFatal

public boolean isFatal()
Whether the exception was fatal.

Returns

true if fatal

getCustomKeys

public Map<String, String> getCustomKeys()
Optional custom key/value context attached to the report.

Returns

an unmodifiable map of custom keys

asBuilder

public AnalyticsCrashReport.Builder asBuilder()
Returns a builder for adding custom keys to a base report.

Returns

a builder seeded from this report