diff options
Diffstat (limited to 'ui/app/components/error_panel.js')
-rw-r--r-- | ui/app/components/error_panel.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ui/app/components/error_panel.js b/ui/app/components/error_panel.js index fc88d459..7b360448 100644 --- a/ui/app/components/error_panel.js +++ b/ui/app/components/error_panel.js @@ -9,11 +9,21 @@ export default class ErrorPanel extends React.Component { } render () { + var error_msg = null + var error = this.props.error + console.log(error) + if (error instanceof Error && error.stack) { + error_msg = error.stack + } else if (error instanceof PromiseRejectionEvent) { + error_msg = "Error connecting to bitmaskd" + } else { + error_msg = error.toString() + } return ( - <Center width="400"> + <Center width="600"> <Area> <h1>Error</h1> - {this.props.error} + {error_msg} </Area> </Center> ) |