MCPcopy Create free account
hub / github.com/gaearon/react-hot-loader / componentDidCatch

Method componentDidCatch

src/AppContainer.dev.js:50–68  ·  view source on GitHub ↗
(error, errorInfo)

Source from the content-addressed store, hash-verified

48 }
49
50 componentDidCatch(error, errorInfo) {
51 logger.error(error);
52
53 if (!hotComparisonOpen()) {
54 // do not log error outside of HMR cycle
55
56 // trigger update to kick error
57 this.setState({});
58 throw error;
59 }
60 const { errorReporter = configuration.errorReporter } = this.props;
61 if (!errorReporter) {
62 logException(error, errorInfo, this);
63 }
64 this.setState({
65 error,
66 errorInfo,
67 });
68 }
69
70 retryHotLoaderError() {
71 this.setState({ error: null }, () => {

Callers

nothing calls this directly

Calls 1

hotComparisonOpenFunction · 0.90

Tested by

no test coverage detected