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:
Ray Schamp committed 2018-04-11 21:04:14 -04:00
1 parent 7eb6e32778
commit cd4a055bb7
1 file changed
+1 -1
+1 -1
View File
@@ -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',