Skip to content

Commit

Permalink
Merge pull request #312 from rollbar/unhandled-rejections
Browse files Browse the repository at this point in the history
Unhandled rejections [Fixes #307]
  • Loading branch information
rokob authored Jun 15, 2017
2 parents 20eb27d + 81a785a commit 616642f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdks/rollbar.js/src/browser/rollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Rollbar.prototype.handleUnhandledRejection = function(reason, promise) {
if (_.isError(reason)) {
item = this._createItem([message, reason, context]);
} else {
item = this._createItem([message, context]);
item = this._createItem([message, reason, context]);
item.stackInfo = _.makeUnhandledStackInfo(
message,
'',
Expand All @@ -137,6 +137,8 @@ Rollbar.prototype.handleUnhandledRejection = function(reason, promise) {
}
item.level = this.options.uncaughtErrorLevel;
item._isUncaught = true;
item._originalArgs = item._originalArgs || [];
item._originalArgs.push(promise);
this.client.log(item);
};

Expand Down

0 comments on commit 616642f

Please sign in to comment.