Skip to content

Commit

Permalink
Prevent logging same errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Gediminas Ubartas committed Jun 25, 2015
1 parent 2560645 commit 7387d87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/angular-error-logger.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/angular-error-logger-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ angular.module('angularErrorLogger').factory(
"angularErrorLoggerService",
function ($log, $window, exceptionSender, ANGULAR_ERROR_LOGGER_CONFIG) {
'use strict';
var loggedExceptions = [];

function logErrorToServerSide(exception, cause) {
var loggedExceptions = [],
errorMessage = exception ? exception.toString() : "no exception",
var errorMessage = exception ? exception.toString() : "no exception",
stackTrace =
exception ? (exception.stack ? exception.stack.toString() : "no stack") : "no exception",
browserInfo = {
Expand All @@ -25,7 +26,7 @@ angular.module('angularErrorLogger').factory(
}
loggedExceptions.push(stackTrace);
} else {
$log.debug("Dublicated error");
$log.debug("Dublicated error. No logging sent");
}

}
Expand Down

0 comments on commit 7387d87

Please sign in to comment.