Skip to content

Commit

Permalink
Rename placeholder error name
Browse files Browse the repository at this point in the history
  • Loading branch information
foxyblocks committed Oct 6, 2016
1 parent 1248c74 commit 41e37dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/bugsnag.js
Expand Up @@ -17,6 +17,7 @@
shouldCatch = true,
ignoreOnError = 0,
breadcrumbs = [],
placeHolderErrorName = "BugsnagNotify",

// We've seen cases where individual clients can infinite loop sending us errors
// (in some cases 10,000+ errors per page). This limit is at the point where
Expand Down Expand Up @@ -78,7 +79,7 @@
if (!exception) {
var message = "Bugsnag.notifyException() was called with no arguments";
log(message);
self.notify("UnspecifiedBugsnagError", message);
self.notify(placeHolderErrorName, message);
return;
}

Expand Down Expand Up @@ -119,7 +120,7 @@
// without requiring an exception.
self.notify = function (name, message, metaData, severity) {
if (!name) {
name = "UnspecifiedBugsnagError";
name = placeHolderErrorName;
message = "Bugsnag.notify() was called with no arguments";
log(message);
}
Expand Down
4 changes: 2 additions & 2 deletions test/test.bugsnag.js
Expand Up @@ -112,7 +112,7 @@ describe("Bugsnag", function () {
it("should add custom class when no exception is given", function () {
Bugsnag.notifyException();

assert.equal(requestData().params.name, "UnspecifiedBugsnagError");
assert.equal(requestData().params.name, "BugsnagNotify");
});

it("should contain the correct exception message", function () {
Expand Down Expand Up @@ -377,7 +377,7 @@ describe("Bugsnag", function () {
it("should create an error name when none is provided", function () {
Bugsnag.notify();

assert.equal(requestData().params.name, "UnspecifiedBugsnagError");
assert.equal(requestData().params.name, "BugsnagNotify");
});


Expand Down

0 comments on commit 41e37dd

Please sign in to comment.