Class EventEmitter<TSender, TArgs>

Event emitter.

Wraps every subscriber in a try/catch so a buggy subscriber's throw is logged via console.error and the dispatch loop continues with the next subscriber. Without this isolation, the underlying strongly-typed-events dispatcher re-throws the first failure straight back into whatever SDK code path fired the event — so a single bad subscriber would halt a destroy cascade, a model load, or any other event-emitting flow mid-way. Errors are logged with the emitter's name (when provided) so they're trivially greppable.

Type Parameters

  • TSender

    Type of the event sender

  • TArgs

    Type of the event argument

Constructors

Accessors

Methods

Constructors

Accessors

Methods