fix: Rrror parser throw (#1225)

* Warn instead of throwing error when parsing for console logs

* Added error to warning
This commit is contained in:
Ben White
2023-05-15 14:19:42 +02:00
committed by GitHub
parent 0fedb8ed19
commit 4dcdcf7ec4

View File

@@ -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)