ErrorBoundary
Defined in: ErrorBoundary.ts:9
Wraps system and component execution. On error, disables the offending system/component and logs the error. The game loop never crashes.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ErrorBoundary(
logger):ErrorBoundary
Defined in: ErrorBoundary.ts:14
Parameters
Section titled “Parameters”logger
Section titled “logger”Returns
Section titled “Returns”ErrorBoundary
Methods
Section titled “Methods”getDisabled()
Section titled “getDisabled()”getDisabled():
object
Defined in: ErrorBoundary.ts:52
Get all disabled systems and components for inspection.
Returns
Section titled “Returns”object
components
Section titled “components”components: readonly
object[]
systems
Section titled “systems”systems: readonly
object[]
wrapComponent()
Section titled “wrapComponent()”wrapComponent(
component,fn):void
Defined in: ErrorBoundary.ts:35
Wrap a component lifecycle or update call. On throw, disables the component.
Parameters
Section titled “Parameters”component
Section titled “component”() => void
Returns
Section titled “Returns”void
wrapSystem()
Section titled “wrapSystem()”wrapSystem(
system,fn):void
Defined in: ErrorBoundary.ts:19
Wrap a system update call. On throw, disables the system.
Parameters
Section titled “Parameters”system
Section titled “system”() => void
Returns
Section titled “Returns”void