Exception/Error tracking and logging suggestions?

508 views
Skip to first unread message

Benjamin Rhodes

unread,
Feb 27, 2013, 1:24:02 PM2/27/13
to ang...@googlegroups.com
Hey all,

I'm looking for suggestions for tracking/logging javascript exceptions in the browser.


Thanks,

Benjamin 

Clint Checketts

unread,
Feb 27, 2013, 1:31:31 PM2/27/13
to ang...@googlegroups.com
There is a default $exceptionHandler you can override, then you can do whatever custom behavior you want. 


Example:
app.factory('$exceptionHandler',function(){
    return function(exception, cause){
        alert(JSON.stringify(exception), cause);
    };
});


--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Benjamin Rhodes

unread,
Feb 27, 2013, 1:51:49 PM2/27/13
to ang...@googlegroups.com
Thank you Clint that thread is most helpful.  For some reason my search didn't yield that thread.

Have you tried sending these types errors back to a server or service so you can review them later, i.e. airbrake.io, newrelic.com etc?

Clint Checketts

unread,
Feb 27, 2013, 1:57:06 PM2/27/13
to ang...@googlegroups.com
I am currently sending errors back in my current app (non Angular) with my own endpoint, but I have hopes to use this technique once I get further in my migration plans.
Reply all
Reply to author
Forward
0 new messages