Skip to content
Snippets Groups Projects
Commit afe84d52 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Record fatal error boundary hits to analytics

parent e3114c13
Branches
Tags
No related merge requests found
......@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import platform from 'platform';
import BrowserModalComponent from '../components/browser-modal/browser-modal.jsx';
import log from '../lib/log.js';
import analytics from '../lib/analytics';
class ErrorBoundary extends React.Component {
constructor (props) {
......@@ -16,6 +17,11 @@ class ErrorBoundary extends React.Component {
// Display fallback UI
this.setState({hasError: true});
log.error(`Unhandled Error: ${error}, info: ${info}`);
analytics.event({
category: 'error',
action: 'Fatal Error',
label: error.message
});
}
handleBack () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment