components/bits/SilentErrorBoundary#
SilentErrorBoundary#
Catches errors in a non-critical widget so it cannot take the app down.
"Silent" refers to the app, not the user: the widget used to render null,
so a crashed status-bar item simply vanished and the missing readout looked
like a missing feature. It now leaves a small marker whose tooltip names the
component and the error, which is the difference between "this is broken" and
"this was never here".
Extends#
Component<Props,State>
Constructors#
Constructor#
Parameters#
| Parameter | Type |
|---|---|
props |
Props |
Returns#
Overrides#
Methods#
componentDidCatch()#
Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.
Parameters#
| Parameter | Type |
|---|---|
error |
Error |
errorInfo |
ErrorInfo |
Returns#
void
Overrides#
getDerivedStateFromError()#
Parameters#
| Parameter | Type |
|---|---|
error |
Error |
Returns#
Partial<State>
render()#
Returns#
| string
| number
| boolean
| Element
| Iterable<ReactNode, any, any>