Skip to content

Commit

Permalink
Add es6-shim note about automatically logging potentially unhandled r…
Browse files Browse the repository at this point in the history
…ejections
  • Loading branch information
briancavalier committed May 15, 2014
1 parent 369f584 commit b58bd87
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/es6-promise-shim.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ function doAsyncStuff() {
## 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:
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).
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:
```js
var monitor = require('when/monitor');
Expand Down

0 comments on commit b58bd87

Please sign in to comment.