Skip to content

Commit 1c7a86c

Browse files
benvinegarkamilogorek
authored andcommitted
docs: Recommend Raven.context in getting started docs
1 parent 58d3d20 commit 1c7a86c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/index.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ Next you need to configure Raven.js to use your `Sentry DSN
3838
3939
Raven.config('___PUBLIC_DSN___').install()
4040
41+
It is additionally recommended (but not required) to wrap your application start using `Raven.context`.
42+
This can help surface additional errors in some execution contexts.
43+
44+
.. code-block:: javascript
45+
46+
Raven.context(function () {
47+
initMyApp();
48+
});
49+
4150
At this point, Raven is ready to capture any uncaught exception.
4251

4352
Once you have Raven up and running, it is highly recommended to check out :doc:`config`

0 commit comments

Comments
 (0)