Skip to content

Commit

Permalink
Catch some exceptions with raven-js
Browse files Browse the repository at this point in the history
  • Loading branch information
thefinn93 committed Nov 25, 2016
1 parent 50774b6 commit 1139b59
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions piston/static/js/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,15 @@ function onSubmit(e) {
serviceWorkerRegistration.pushManager.subscribe({userVisibleOnly: true}).then((subscription) => {
document.querySelector("input[name='subscription']").value = JSON.stringify(subscription.toJSON());
document.querySelector(".approval-form").submit();
}).catch((e) => {
var exception = Raven.captureException(e);
console.log(e, exception);
});
});
}
}).catch((e) => {
var exception = Raven.captureException(e);
console.log(e, exception);
});
}

Expand Down

0 comments on commit 1139b59

Please sign in to comment.