feat: Prints an error log for errors in child components render methods.
This commit is contained in:
parent
b9866e3464
commit
5c299bcd46
|
@ -100,6 +100,18 @@ export default class BaseApp extends Component<*, State> {
|
|||
this.state.store.dispatch(appWillUnmount(this));
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs for errors that were not caught.
|
||||
*
|
||||
* @param {Error} error - The error that was thrown.
|
||||
* @param {Object} info - Info about the error(stack trace);.
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
componentDidCatch(error: Error, info: Object) {
|
||||
logger.error(error, info);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delays this {@code BaseApp}'s startup until the {@code Storage}
|
||||
* implementation of {@code localStorage} initializes. While the
|
||||
|
|
Loading…
Reference in New Issue