# Ember promise error logger not catching exception

**URL:** <https://discuss.emberjs.com/t/ember-promise-error-logger-not-catching-exception/7996>\
**Category:** Design\
**Created:** [May 13, 2015, 6:45pm UTC](https://discuss.emberjs.com/t/ember-promise-error-logger-not-catching-exception/7996 "2015-05-13T18:45:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kilowhisky](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kilowhisky/32/17044_2.png) [@Kilowhisky](https://discuss.emberjs.com/u/Kilowhisky)\
**Post date:** [May 13, 2015, 6:45pm UTC](https://discuss.emberjs.com/t/ember-promise-error-logger-not-catching-exception/7996/1 "2015-05-13T18:45:08Z")

</div>

I have code to log errors based off of this code from the site. [Debugging - Understanding Ember.js - Ember Guides](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?
