edit this page - page history - about editing

Capturing EmberJS errors with Raygun.io

EmberJS

To capture raygun.io errors within an Ember application, at the most basic level you can add an error handler to Ember.onerror:

Ember.onerror = (error) ->
  Raygun.send(error)
  console.error(error)    # optional: fixes https://github.com/emberjs/ember.js/issues/4817

If you have an error handler in your ApplicationRoute that captures and discards all errors, you should also capture the errors within the error action:

App.ApplicationRoute = Ember.Route.extend
  actions:
    error: (error, transition) ->
      # Log with Raygun.io
      Raygun.send(error)

      # Silently continue
      return true

Categories: EmberJS | Javascript
edit this page - what links to here? - page history - top
Last edited by jevon jevon 36 months ago