From cd4a055bb7497668c7404bcaa55de0351a53cd3a Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Wed, 11 Apr 2018 21:04:14 -0400 Subject: [PATCH] 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. --- src/containers/error-boundary.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/error-boundary.jsx b/src/containers/error-boundary.jsx index 4c473a737..e1a740613 100644 --- a/src/containers/error-boundary.jsx +++ b/src/containers/error-boundary.jsx @@ -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',