canjs / can-zone

A context for tracking asynchronous activity in JavaScript applications.
https://v4.canjs.com/doc/can-zone.html
MIT License
92 stars 4 forks source link

Properly handle promise rejection chains #70

Closed matthewp closed 8 years ago

matthewp commented 8 years ago

This updates the Promise wrapping to properly handle rejection chains. If some code throws a string we should wrap it in an Error and rethrow it. This fixes a bug where System.imports that are rejected were not having their rejection bubble up.