This repository has been archived by the owner on Jan 7, 2019. It is now read-only.
forked from PatrickJS/angular-raven
-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular-raven.min.js
1 lines (1 loc) · 1.79 KB
/
angular-raven.min.js
1
!function(a,b,c){"use strict";function d(){this.development=function(a){return g=a||g,this},this.$get=["$window","$log",function(a,d){var e={VERSION:a.Raven?a.Raven.VERSION:"development",TraceKit:a.Raven?a.Raven.TraceKit:"development",captureException:function(b,c){g?d.error("Raven: Exception ",b,c):a.Raven.captureException(b,c)},captureMessage:function(b,c){g?d.error("Raven: Message ",b,c):a.Raven.captureMessage(b,c)},setUser:function(b){g?d.info("Raven: User ",b):a.Raven.setUser?a.Raven.setUser(b):a.Raven.setUserContext&&a.Raven.setUserContext(b)},setUserContext:function(b){g?d.info("Raven: User ",b):a.Raven.setUserContext?a.Raven.setUserContext(b):a.Raven.setUser&&a.Raven.setUser(b)},lastException:function(){g?d.error("Raven: Last Exception"):a.Raven.lastException()},setExtraContext:function(b){g?d.info("Raven: Extra Context ",b):a.Raven.setExtraContext(b)},setTagsContext:function(b){g?d.info("Raven: Tags Context ",b):a.Raven.setTagsContext(b)},context:function(a,d,e){var f=this;return b.isFunction(a)&&(e=d||[],d=a,a=c),f.wrap(a,d).apply(f,e)},wrap:function(a,d){function e(){for(var b=[],c=arguments.length;c--;)b[c]=f.wrap(a,arguments[c]);try{return d.apply(this,b)}catch(e){f.captureException(e,a)}}var f=this;if(b.isUndefined(d)&&!b.isFunction(a))return a;if(b.isFunction(a)&&(d=a,a=c),!b.isFunction(d))return d;if(d.__raven__)return d;for(var g in d)d.hasOwnProperty(g)&&(e[g]=d[g]);return e.__raven__=!0,e}};return e}]}function e(a){a.decorator("$exceptionHandler",["$delegate","$raven","$injector",f])}function f(a,b,c){function d(d,f){e=e||c.get("$location");var g={culprit:e.absUrl(),extra:{exception:d,cause:f}};b.captureException(d,g),a(d,f)}var e;return d}var g=null;b.module("ngRaven",[]).provider("$raven",d).provider("Raven",d).config(["$provide",e]),b.module("angular-raven",["ngRaven"])}(this,angular);