Created
December 15, 2014 15:33
-
-
Save xcarpentier/7b1ede4ef4c7cf75c24e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* recommandé */ | |
angular | |
.module('blocks.exception') | |
.factory('exception', exception); | |
exception.$inject = ['logger']; | |
function exception(logger) { | |
var service = { | |
catcher: catcher | |
}; | |
return service; | |
function catcher(message) { | |
return function (reason) { | |
logger.error(message, reason); | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment