Formatting

This commit is contained in:
binwiederhier 2023-05-24 21:59:04 -04:00
parent 6bb5274d83
commit e7bf165934

View File

@ -46,9 +46,7 @@ class ErrorBoundaryImpl extends React.Component {
// Fetch additional info and a better stack trace // Fetch additional info and a better stack trace
StackTrace.fromError(error).then((stack) => { StackTrace.fromError(error).then((stack) => {
console.error("[ErrorBoundary] Stacktrace fetched", stack); console.error("[ErrorBoundary] Stacktrace fetched", stack);
const stackString = stack const stackString = stack.map((el) => ` at ${el.functionName} (${el.fileName}:${el.columnNumber}:${el.lineNumber})`).join("\n");
.map((el) => ` at ${el.functionName} (${el.fileName}:${el.columnNumber}:${el.lineNumber})`)
.join("\n");
const niceStack = `${error.toString()}\n${stackString}`; const niceStack = `${error.toString()}\n${stackString}`;
this.setState({ niceStack }); this.setState({ niceStack });
}); });