Last active
August 29, 2015 14:16
-
-
Save zdenal/253f7d24c16dcbca7d44 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"predef": { | |
... | |
"Bugsnag": true, | |
... | |
}, | |
... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"dependencies": { | |
... | |
"bugsnag": "~2.4.7" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
var app = new EmberApp({ | |
... | |
sourcemaps: { | |
"enabled": true, | |
"extensions": ["js"] | |
} | |
}); | |
app.import('bower_components/bugsnag/src/bugsnag.js'); | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import config from '../config/environment'; | |
export default { | |
name: 'bugsnag', | |
after: 'authentication', | |
initialize: function(container) { | |
var appController = container.lookup('controller:application'); | |
Bugsnag.apiKey = config.APP.BUGSNAG.API_KEY; | |
Bugsnag.releaseStage = config.environment; | |
Bugsnag.notifyReleaseStages = ["staging", "production"]; | |
// Routing errors and edge cases | |
Ember.onerror = function(error) { | |
Bugsnag.context = appController.get('currentPath'); | |
Bugsnag.notifyException(error); | |
}; | |
// Errors that occur in Promises | |
Ember.RSVP.on('error', function (error) { | |
Bugsnag.context = appController.get('currentPath'); | |
Bugsnag.notifyException(error); | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment