wmluke / angular-bugsnag

Angular wrapper for Bugsnag
36 stars 13 forks source link

Add notify and notifyException #12

Closed JacobMarshallPP closed 9 years ago

JacobMarshallPP commented 9 years ago

Add bugsnag#notify and bugsnag#notifyException for custom error reporting.

I would have thought this was already available, seeing as the README references the angular injected bugsnag.notify function. I need this on a current project, and have made local changes.

Am I missing anything, or is there a reason the two functions were never included?

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 80.65% when pulling b28db40dbda04d7971677ded4d3a78b3783066b2 on JacobMarshallDA:feature-notify-helpers into 8c28f69abb504f55a30fd1efbfd0878aac2f3915 on wmluke:master.

wmluke commented 9 years ago

Hi Jacob,

Just inject bugsnag into a controller, service, directive, etc to use bugsnag.notify or bugsnag.notifyException. Additionally, keep in mind that angular-bugsnag creates a no conflict instance of bugsnag. Also, your PR adds these methods to the bugsnagProvider instance and not the bugsnag instance.

Take a look at https://github.com/wmluke/angular-bugsnag/blob/master/test/app/scripts/app.js#L24 for an example. You ca run the example app by running make and then gulp serve.

Make sense?

jmshal commented 9 years ago

Haha, I just derped. Thanks a bunch @wmluke, that makes perfect sense.

Edit: Whoops, wrong account, but oh well...