Skip to content

Class: ErrorBoundary

Defined in: src/betterdiscord/ui/errorboundary.tsx:15

Extends

Constructors

Constructor

ts
new ErrorBoundary(props: ErrorBoundaryProps): ErrorBoundary;

Defined in: src/betterdiscord/ui/errorboundary.tsx:26

Creates an error boundary with optional fallbacks and debug info.

Parameters

ParameterTypeDescription
propsErrorBoundaryProps

Returns

ErrorBoundary

Overrides

ts
React.Component<ErrorBoundaryProps, {hasError: boolean;}>.constructor

Methods

componentDidCatch()

ts
componentDidCatch(error: Error): void;

Defined in: src/betterdiscord/ui/errorboundary.tsx:31

Catches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.

Parameters

ParameterType
errorError

Returns

void

Overrides

ts
React.Component.componentDidCatch

render()

ts
render(): 
  | string
  | number
  | bigint
  | boolean
  | Iterable<ReactNode, any, any>
  | Promise<AwaitedReactNode>
  | Element
  | null
  | undefined;

Defined in: src/betterdiscord/ui/errorboundary.tsx:37

Returns

| string | number | bigint | boolean | Iterable<ReactNode, any, any> | Promise<AwaitedReactNode> | Element | null | undefined

Overrides

ts
React.Component.render