# Class AnalyticsCrashReport

java.lang.Object
com.codename1.analytics.AnalyticsCrashReport

public final class AnalyticsCrashReport extends Object
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 Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `AnalyticsCrashReport.Builder`
  Mutable builder for `AnalyticsCrashReport`.

- ## Method Summary

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

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### create

    public static AnalyticsCrashReport create(Throwable throwable, String message, boolean fatal)

    Creates a crash report.

    ###### Parameters

    - `throwable`: the captured exception, may be null

    - `message`: a human readable description, may be null

    - `fatal`: 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