UnexpectedError: add error repl if failed to parse
This commit is contained in:
parent
a0811ed6c4
commit
832a59031a
1 changed files with 10 additions and 1 deletions
|
@ -18,7 +18,16 @@ const UnexpectedError: Component<{ error?: any }> = (props) => {
|
|||
.join("\n");
|
||||
return `${err.name}: ${err.message}\n${strackMsg}`;
|
||||
} catch (reason) {
|
||||
return `<failed to build the stacktrace of "${err}"...>\n${reason}`;
|
||||
return `<failed to build the stacktrace of "${err}"...>\n${reason}\n${JSON.stringify(
|
||||
{
|
||||
name: err.name,
|
||||
stack: err.stack,
|
||||
cause: err.cause,
|
||||
message: err.message,
|
||||
},
|
||||
undefined,
|
||||
2,
|
||||
)}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue