mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Include stack trace in file view error window
This commit is contained in:
@@ -14,7 +14,11 @@ export function FileView({ docAndNode: original }: FileViewProps) {
|
||||
|
||||
const [error, errorRetry] = useErrorBoundary()
|
||||
if (error) {
|
||||
return <ErrorPanel error={`Error viewing the file: ${message(error)}`} onDismiss={errorRetry} />
|
||||
const viewError = new Error(`Error viewing the file: ${message(error)}`)
|
||||
if (error.stack) {
|
||||
viewError.stack = error.stack
|
||||
}
|
||||
return <ErrorPanel error={viewError} onDismiss={errorRetry} />
|
||||
}
|
||||
|
||||
const docAndNode = useDocAndNode(original)
|
||||
|
||||
Reference in New Issue
Block a user