@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / ScriptErrorEvent
Type Alias: ScriptErrorEvent ​
ts
type ScriptErrorEvent = {
entityId: number;
entityName: string;
scriptUrl: string;
className: string;
phase: ScriptErrorPhase;
message: string;
stack?: string;
source: ScriptErrorSource;
};Defined in: scriptErrors.ts:26
Emitted by world.onScriptError(...) the first time a distinct script error occurs. "Distinct" is the combination of script URL, class name, phase and message: ten enemies running the same broken script report once.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
entityId | number | Entity the failing script is attached to. | scriptErrors.ts:28 |
entityName | string | That entity's name (Name component), or "Entity <id>". | scriptErrors.ts:30 |
scriptUrl | string | URL of the script module. Empty when unknown. | scriptErrors.ts:32 |
className | string | Script class name. | scriptErrors.ts:34 |
phase | ScriptErrorPhase | Lifecycle phase or hook name. See ScriptErrorPhase. | scriptErrors.ts:36 |
message | string | Short error message, with local file paths removed. | scriptErrors.ts:38 |
stack? | string | Stack trace when the error carried one, with local file paths removed. | scriptErrors.ts:40 |
source | ScriptErrorSource | Behaviour or ScriptObject. | scriptErrors.ts:42 |

