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
2026-04-01 12:00:00 +08:00
committed by GitHub
parent d882347a08
commit 4a247f0a73

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)