Comments (8)
@constantm I've rewritten this to use the latest airbrake api and be a little smarter overall about how it works.
Can you try version 0.1.0? Probably easiest to remove the existing ember-cli-airbrake
entry from your package.json and do: ember install [email protected]
. Your existing configuration should work with 0.1.0, but please check out the updated README if necessary.
from ember-cli-airbrake.
Awesome thanks, will give it a go! :)
from ember-cli-airbrake.
Right, I've had a look and it seems that I can inject the Airbrake service, and then manually send error notifications. However, it still doesn't catch window or Ember exceptions.
from ember-cli-airbrake.
@constantm Can you let me know more about your setup? I misread this title before — are you actually using ember pre 1.0? Or Ember 1.13.x?
In Ember 1.13, it appears that errors in transitions do not get to the Ember onerror
handler. They do in Ember 2.1. I think what you are going to want to do is add an error
action in your application route that can use the airbrake service to explicitly send errors.
Here is an example app, btw, if you'd like to see what I was testing it with. Adding errors to the model
hook of the application route do not get seen by ember-cli-airbrake with ember 1.13, but they do with ember 2.1.
from ember-cli-airbrake.
@bantic Sorry about the title - meant 1.13.x :)
Thanks, I'll add in an action as suggested. I should probably update Ember sooner rather than later.
from ember-cli-airbrake.
@constantm No worries, thanks for opening the issue. I'll add another one to document that the error
action should be used in ember 1.13.x. (A doc PR would also be welcome). thanks!
from ember-cli-airbrake.
Wanted to add some docs for this and went over it again. It seems that it now actually does work with Ember 1.13.x? What's more, when an error occurs it doesn't actually bubble to the application route and the error
action never gets fired. Even though it works, I'm super confused now.
from ember-cli-airbrake.
@constantm Can you share any code? This addon should work (insofar as it adds the airbrake client code, adds window.onerror and Ember.onerror handlers that report to airbrake, and exposes an 'airbrake' service when installed) for Ember 1.13.x as of the latest version (0.1.0).
In Ember 1.13, errors in route transitions do not fire Ember.onerror, but they do fire an "error" action if it exists, so for Ember 1.13.x you would want to add an "error" action in an appropriate route (the application route, most likely, which is where an error in any route would eventually bubble to), and use the airbrake service to explicitly notify at that spot.
Does that help clear it up?
from ember-cli-airbrake.
Related Issues (10)
- Only import vendor/airbrake-shim.js if ember-cli-airbrake is enabled
- Overrides Embers RSVP onerror default HOT 2
- add documentation on using an `error` action for Ember 1.13.x
- issue with version 0.0.7 HOT 2
- Upgrade airbrake HOT 5
- sourcemap support
- update ember-cli-babel
- Cut a new release to NPM HOT 1
- Release to npm HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-airbrake.