c# - Serialize JavaScript Error to Web API 2 -


i want catch unhandled exceptions in angularjs app , send via api able log it.

is there object javascript error type serializes in .net?

 $provide.decorator("$exceptionhandler", ['$delegate', '$injector', function ($delegate, $injector) {         return function (exception, cause) {             var $http = $injector.get("$http");             var log = {                 error: exception,                 message: cause             }             $http.post('api/log', log)             .finally(function () {                 //send error page             });             $delegate(exception, cause);         };     }]); 


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -