Interface nsICrashReporterType

Provides access to crash reporting functionality.

Status

UNSTABLE - This interface is not frozen and will probably change in future releases.

Hierarchy

Properties

crashReporterEnabled: boolean

Get the enabled status of the crash reporter.

minidumpPath: nsIFile

Get or set the path on the local system to which minidumps will be written when a crash happens.

Throw

NS_ERROR_NOT_INITIALIZED if crash reporting is not initialized

serverURL: nsIURL

Get or set the URL to which crash reports will be submitted. Only https and http URLs are allowed, as the submission is handled by OS-native networking libraries.

Throw

NS_ERROR_NOT_INITIALIZED if crash reporting is not initialized

Throw

NS_ERROR_INVALID_ARG on set if a non-http(s) URL is assigned

Throw

NS_ERROR_FAILURE on get if no URL is set

submitReports: boolean

User preference for submitting crash reports.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Cause the crash reporter to re-evaluate where crash events should go.

    This should be called during application startup and whenever profiles change.

    Returns void

  • Add some extra data to be submitted with a crash report.

    Throw

    NS_ERROR_NOT_INITIALIZED if crash reporting not initialized

    Throw

    NS_ERROR_INVALID_ARG if key contains an invalid value or data contains invalid characters. Invalid character for data is '\0'.

    Parameters

    • key: string

      Name of a known crash annotation constant.

    • data: string

      Data to be added.

    Returns void

  • Append some data to the "Notes" field, to be submitted with a crash report. Unlike annotateCrashReport, this method will append to existing data.

    Throw

    NS_ERROR_NOT_INITIALIZED if crash reporting not initialized

    Throw

    NS_ERROR_INVALID_ARG if data contains invalid characters. The only invalid character is '\0'.

    Parameters

    • data: string

      Data to be added.

    Returns void

  • Append note containing an Obj-C exception's info.

    Parameters

    • aException: voidPtr

      NSException object to append note for

    Returns void

  • Get the extra file corresponding to the specified ID.

    Returns

    The extra file associated with the ID.

    Throw

    NS_ERROR_FILE_NOT_FOUND if the extra file could not be found

    Parameters

    • id: string

      ID of the crash. Likely a UUID.

    Returns nsIFile

  • Get the minidump file corresponding to the specified ID.

    Returns

    The minidump file associated with the ID.

    Throw

    NS_ERROR_FILE_NOT_FOUND if the minidump could not be found

    Parameters

    • id: string

      ID of the crash. Likely a UUID.

    Returns nsIFile

  • Checks if an annotation is allowlisted for inclusion in the crash ping.

    Returns

    True if the specified value is a valid annotation and can be included in the crash ping, false otherwise.

    Throw

    NS_ERROR_INVALID_ARG if key contains an invalid value.

    Parameters

    • value: string

    Returns boolean

  • Register a given memory range to be included in the crash report.

    Throw

    NS_ERROR_NOT_INITIALIZED if crash reporting not initialized

    Throw

    NS_ERROR_NOT_IMPLEMENTED if unavailable on the current OS

    Parameters

    • ptr: number

      The starting address for the bytes.

    • size: number

      The number of bytes to include.

    Returns void

  • Remove a crash report annotation.

    Throw

    NS_ERROR_NOT_INITIALIZED if crash reporting not initialized

    Throw

    NS_ERROR_INVALID_ARG if key contains an invalid value.

    Parameters

    • key: string

      Name of a known crash annotation constant.

    Returns void

  • Save an anonymized memory report file for inclusion in a future crash report in this session.

    Throws

    NS_ERROR_NOT_INITIALIZED if crash reporting is disabled.

    Returns void

  • Enable or disable crash reporting at runtime. Not available to script because the JS engine relies on proper exception handler chaining.

    Parameters

    • enabled: bool

    Returns void

  • Write a minidump immediately, with the user-supplied exception information. This is implemented on Windows only, because SEH (structured exception handling) exists on Windows only.

    Parameters

    • aExceptionInfo: voidPtr

      EXCEPTION_INFO* provided by Window's SEH

    Returns void

Generated using TypeDoc