Add more information to error boundary messages
While working on the menubar, I couldn't find the source of an error. This adds more stack info to the error messages emitted by the error boundary.
This commit is contained in:
1 parent
7eb6e32778
commit
cd4a055bb7
1 file changed
+1
-1
@@ -17,7 +17,7 @@ class ErrorBoundary extends React.Component {
|
||||
componentDidCatch (error, info) {
|
||||
// Display fallback UI
|
||||
this.setState({hasError: true});
|
||||
log.error(`Unhandled Error: ${error}, info: ${info}`);
|
||||
log.error(`Unhandled Error: ${error}\n${error.stack}\nComponent stack: ${info.componentStack}`);
|
||||
analytics.event({
|
||||
category: 'error',
|
||||
action: 'Fatal Error',
|
||||
|
||||
Reference in new issue
Block a user