cujojs/when — Issue #18: Listener functions fail silently
Author: bjoerge
Created: 2012-01-21 11:48:37+00:00
State: open

The try/catch wrapper around the code that notifies listener functions will swallow up any error occurring in the call chain of a listener function (./when.js#L281). This is not very desirable as any errors inside a listener function will be suppressed.

Consider the following example:

```javascript
var deferred = when.defer();
deferred.then(function() {
i.will.produce.ReferenceError
});
deferred.resolve();
```

This will fail silently, which is clearly not the expected behavior (I would expect a message to appear in the error log of the browser/environment).