Hi,
I'm trying to log errors remotely by overriding $exceptionHandler. Essentially I want this:
myModule.factory('$exceptionHandler', ['$http', function($http) {
return function(exception, cause) {
$
http.post('/errorlog', { something with exception and cause });
};
}]);
The message: Circular dependency: $http <- $exceptionHandler <- $rootScope
The problem is that $http depends on $exceptionHandler. How can I break the cycle? I was playing around with providers (both making an $exceptionHandlerProvider and taking an $httpProvider), but couldn't seem to get them to work.
Martin