Skip to content

Commit 540b5f0

Browse files
committed
docs: Include information about fatalError install callback
1 parent 343da4a commit 540b5f0

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

docs/config.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,20 @@ To get started, you need to configure Raven to use your Sentry DSN:
66
.. sourcecode:: javascript
77

88
var Raven = require('raven');
9-
Raven.config('___PUBLIC_DSN___').install()
9+
Raven.config('___PUBLIC_DSN___').install();
1010

1111
At this point, Raven is ready to capture any uncaught exceptions.
1212

13+
Note that the ``install`` method can optionally take a callback function that is invoked if a fatal, non-recoverable error occurs.
14+
You can use this callback to perform any cleanup that should occur before the Node process exits.
15+
16+
.. sourcecode:: javascript
17+
18+
Raven.config('___PUBLIC_DSN___').install(function (err, initialErr, eventId) {
19+
console.error(err);
20+
process.exit(1);
21+
});
22+
1323
Optional settings
1424
-----------------
1525

@@ -18,8 +28,8 @@ Optional settings
1828
.. sourcecode:: javascript
1929

2030
Raven.config('___PUBLIC_DSN___', {
21-
release: '1.3.0'
22-
}).install()
31+
release: '1.3.0'
32+
}).install();
2333

2434
Those configuration options are documented below:
2535

0 commit comments

Comments
 (0)