Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

nsICrashReporter

Provides access to crash reporting functionality.
1.0
28
Introduced
Gecko 1.9
Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)

Method overview

void annotateCrashReport(in ACString key, in ACString data);
void appendAppNotesToCrashReport(in ACString data);
void appendObjCExceptionInfoToAppNotes(in voidPtr aException); Native code only!
void writeMinidumpForException(in voidPtr aExceptionInfo); Native code only!

Attributes

Attribute Type Description
enabled boolean Enable or disable the crashreporter at runtime.
minidumpPath nsILocalFile Get or set the path on the local system to which minidumps will be written when a crash happens.
Exceptions thrown
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.
Exceptions thrown
NS_ERROR_FAILURE
On get if no URL is set.
NS_ERROR_INVALID_ARG
On set if a non-http(s) URL is assigned.
NS_ERROR_NOT_INITIALIZED
If crash reporting is not initialized.
submitReports boolean User preference for submitting crash reports.

Methods

annotateCrashReport()

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

void annotateCrashReport(
  in ACString key,
  in ACString data
);
Parameters
key
Name of the data to be added.
data
Data to be added.
Exceptions thrown
NS_ERROR_INVALID_ARG
If key or data contain invalid characters. Invalid characters for key are '=' and '\n'. Invalid character for data is '\0'.
NS_ERROR_NOT_INITIALIZED
If crash reporting not initialized.

Requires Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0)

appendAppNotesToCrashReport()

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

void appendAppNotesToCrashReport(
  in ACString data
);
Parameters
data
Data to be added.
Exceptions thrown
NS_ERROR_INVALID_ARG
If data contains invalid characters. The only invalid character is '\0'.
NS_ERROR_NOT_INITIALIZED
If crash reporting not initialized.

Native code only!

appendObjCExceptionInfoToAppNotes

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

void appendObjCExceptionInfoToAppNotes(
  in voidPtr aException
);
Parameters
aException
NSException object to append note for.

Native code only!

writeMinidumpForException

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.

void writeMinidumpForException(
  in voidPtr aExceptionInfo
);
Parameters
aExceptionInfo
EXCEPTION_INFO* provided by Window's SEH.

Document Tags and Contributors

 Contributors to this page: Sheppy, Yoric, trevorh
 Last updated by: Sheppy,