Santosh Kumar Adidawarpu
How to Log uncaught AngularJS errors to the backend?
By Santosh Kumar Adidawarpu in .NET on Feb 11 2017
  • Santosh Kumar Adidawarpu
    Feb, 2017 11

    The example below will overwrite the default $exceptionHandler in order to log uncaught errors to the backend for later inspection by the developers using $log.warn() instead of $log.error(). angular.module('exceptionOverwrite', []).factory('$exceptionHandler', ['$log', 'logErrorsToBackend', function($log, logErrorsToBackend) {return function customExcHandler(excp, cause) {logErrorsToBackend(excp, cause);$log.warn(excp, cause);};}]);

    • 2
  • Sakshi Mahajan
    May, 2017 29

    in the browser , where u r executing your project, press f12 u will get to know the error coming in your code also where they r comin

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS