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 committed May 15, 2023
1 parent 0fedb8e commit 4dcdcf7
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 4dcdcf7

Please sign in to comment.