doc: Update new crash-reporter API.
This commit is contained in:
parent
9007a45051
commit
dd4e43eb02
1 changed files with 13 additions and 18 deletions
|
@ -4,24 +4,19 @@ An example of automatically submitting crash reporters to remote server:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
crashReporter = require('crash-reporter');
|
crashReporter = require('crash-reporter');
|
||||||
crashReporter.setProductName('YourName');
|
crashReporter.start({
|
||||||
crashReporter.setCompanyName('YourCompany');
|
productName: 'YourName',
|
||||||
crashReporter.setSubmissionUrl('https://your-domain.com/url-to-submit');
|
companyName: 'YourCompany',
|
||||||
crashReporter.setAutoSubmit(true);
|
submitUrl: 'https://your-domain.com/url-to-submit',
|
||||||
|
autoSubmit: true
|
||||||
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
## crashReporter.setProductName(product)
|
## crashReporter.start(options)
|
||||||
|
|
||||||
* `product` String
|
* `options` Object
|
||||||
|
* `productName` String
|
||||||
## crashReporter.setCompanyName(company)
|
* `companyName` String
|
||||||
|
* `submitUrl` String - URL that crash reports would be sent to
|
||||||
* `company` String
|
* `autoSubmit` Boolean - Send the crash report without user interaction
|
||||||
|
* `ignoreSystemCrashHandler` Boolean
|
||||||
## crashReporter.setSubmissionUrl(url)
|
|
||||||
|
|
||||||
* `url` String
|
|
||||||
|
|
||||||
## crashReporter.setAutoSubmit(is)
|
|
||||||
|
|
||||||
* `is` Boolean
|
|
||||||
|
|
Loading…
Reference in a new issue