Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 760 Bytes

File metadata and controls

23 lines (16 loc) · 760 Bytes

angular-exception-post

An angular module to post JS errors to the server. Uses stacktrace to generate the stacktrace to be posted to the server. Can be configured with a debounce time so a slew of errors aren't posted at once. Based on code from http://engineering.talis.com/articles/client-side-error-logging/

Requirements

  • AngularJS
  • stacktrace

Usage

angular.module('myApp',['loosebits.client.exception.post'])
  .config(['errorLogServiceProvider', function(errorLogServiceProvider) {
    errorLogServiceProvider
      .onSuccess('exceptionHandler') //Service called 
      .debounce(1000)
      .post-url('client-error');
}])