Standardize crash-reporter

This commit is contained in:
Jessica Lord 2015-08-25 05:01:57 -07:00
parent 703ced32db
commit a67767dbea

View file

@ -1,5 +1,7 @@
# crash-reporter # crash-reporter
The `crash-reporter` module enables sending your app's crash reports.
The following is an example of automatically submitting a crash report to a remote server: The following is an example of automatically submitting a crash report to a remote server:
```javascript ```javascript
@ -12,7 +14,11 @@ crashReporter.start({
}); });
``` ```
## crashReporter.start(options) ## Methods
The `crash-reporter` module has the following methods:
### `crashReporter.start(options)`
* `options` Object * `options` Object
* `productName` String, default: Electron * `productName` String, default: Electron
@ -31,19 +37,18 @@ Developers are required to call this method before using other `crashReporter` A
**Note:** On OS X, Electron uses a new `crashpad` client, which is different **Note:** On OS X, Electron uses a new `crashpad` client, which is different
from `breakpad` on Windows and Linux. To enable the crash collection feature, from `breakpad` on Windows and Linux. To enable the crash collection feature,
you are required to call `crashReporter.start` API to initialize `crashpad` in the you are required to call the `crashReporter.start` API to initialize `crashpad` in the main process and in each renderer process from which you wish to collect crash reports.
main process and in each renderer process from which you wish to collect crash reports.
## crashReporter.getLastCrashReport() ### `crashReporter.getLastCrashReport()`
Returns the date and ID of the last crash report. If no crash reports have been Returns the date and ID of the last crash report. If no crash reports have been
sent or the crash reporter has not been started, `null` is returned. sent or the crash reporter has not been started, `null` is returned.
## crashReporter.getUploadedReports() ### `crashReporter.getUploadedReports()`
Returns all uploaded crash reports. Each report contains the date and uploaded ID. Returns all uploaded crash reports. Each report contains the date and uploaded ID.
# crash-reporter payload ## crash-reporter Payload
The crash reporter will send the following data to the `submitUrl` as `POST`: The crash reporter will send the following data to the `submitUrl` as `POST`: