Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Commit

Permalink
fix(errors): skip HTTP errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mlynch committed Nov 17, 2016
1 parent c319404 commit 5906167
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/ion-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,18 @@ window.IonicDevServer = {
document.documentElement.classList.add('ion-diagnostics-cordova-ios');
}
}

window.onerror = function(msg, url, lineNo, columnNo, error) {
self.handleError(error);
};
},

handleError: function(err) {
if (!err) return;

// Ignore HTTP errors
if(err.url || err.headers) return;

// Socket is ready so send this error to the server for prettifying
if (this.socketReady) {
var msg = {
Expand Down

0 comments on commit 5906167

Please sign in to comment.