Skip to content

Commit

Permalink
fix: Rrror parser throw (rrweb-io#1225)
Browse files Browse the repository at this point in the history
* Warn instead of throwing error when parsing for console logs

* Added error to warning
  • Loading branch information
benjackwhite authored and eoghanmurray committed Jul 27, 2023
1 parent 14ddcec commit 5aba92f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ export const ErrorStackParser = {
} else if (error.stack) {
return this.parseFFOrSafari(error as { stack: string });
} else {
throw new Error('Cannot parse given Error object');
console.warn(
'[console-record-plugin]: Failed to parse error object:',
error,
);
return [];
}
},
// Separate line and column numbers from a string of the form: (URI:Line:Column)
Expand Down

0 comments on commit 5aba92f

Please sign in to comment.