Skip to content

Commit b58bd87

Browse files
committed
Add es6-shim note about automatically logging potentially unhandled rejections
1 parent 369f584 commit b58bd87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/es6-promise-shim.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ function doAsyncStuff() {
5858
5959
## Debugging
6060
61-
You can use when.js's promise monitor with the ES6 shim to report unhandled rejections with long stack traces. After loading the shim, ie global `Promise` is now the when.js ES6 shim:
61+
By default, the es6 shim logs *potentially unhandled rejections* to `console.error`, with regular stack traces. This is much like uncaught synchronous exceptions, but it's important to remember that they are *potentially* unhandled because a rejected promise can be handled at a later time (e.g. if someone calls `promise.catch` on it later).
62+
63+
For even deeper debugging, you can use when.js's promise monitor with the ES6 shim to report unhandled rejections with long stack traces. After loading the shim, ie global `Promise` is now the when.js ES6 shim:
6264
6365
```js
6466
var monitor = require('when/monitor');

0 commit comments

Comments
 (0)