Ember promise error logger not catching exception


#1

I have code to log errors based off of this code from the site. http://guides.emberjs.com/v1.11.0/understanding-ember/debugging/

Ember.RSVP.on('error', function(error) {
    Ember.Logger.assert(false, error);
});

But it won’t catch errors like this, they are swallowed up.

extend: function(){
    var _this = this;
    return new Ember.RSVP.Promise(function(resolve, reject) {
        throw new Error('this won\'t be caught');
        var theAuthenticator = _this.container.lookup(_this.authenticator);
        theAuthenticator.extend(_this.content.secure).then(function(content) {
            throw new Error('this WILL be caught');
            _this.setup(_this.authenticator, content, false);
            _this.trigger('sessionExtensionSucceeded');
            resolve();
        }, function(error) {
            _this.trigger('sessionExtensionFailed');
            reject(error);
        });
    });
},

How do i catch errors like this?