Skip to content

API reference / @jsprismarine/script-host / errors

errors ​

Classes ​

Interfaces ​

ScriptApiMemberName ​

Defined in: script-host/src/errors.ts:21

Where a Script API member sits: its module, its class (empty for a module function) and its name.

Properties ​

member ​

readonly member: string

Defined in: script-host/src/errors.ts:25

module ​

readonly module: string

Defined in: script-host/src/errors.ts:22

owner ​

readonly owner: string

Defined in: script-host/src/errors.ts:24

The class or error; empty for a module-level function.


ScriptErrorDetails ​

Defined in: script-host/src/errors.ts:4

What a script's uncaught error reported: its name, message and stack as the engine saw them.

Properties ​

scriptMessage ​

readonly scriptMessage: string

Defined in: script-host/src/errors.ts:6

scriptName ​

readonly scriptName: string

Defined in: script-host/src/errors.ts:5

scriptStack ​

readonly scriptStack: string

Defined in: script-host/src/errors.ts:7

Type Aliases ​

ScriptApiErrorField ​

ScriptApiErrorField = string | number | boolean | undefined

Defined in: script-host/src/errors.ts:52

The value of a field a Script API error carries, such as ArgumentOutOfBoundsError.index.

Functions ​

scriptErrorParams() ​

scriptErrorParams(details): object

Defined in: script-host/src/errors.ts:15

The values a ScriptError is made from: the details its fields read, and the script's error as it prints for the message.

Parameters ​

details ​

ScriptErrorDetails

What the engine reported.

Returns ​

object

error ​

error: string

scriptMessage ​

readonly scriptMessage: string

scriptName ​

readonly scriptName: string

scriptStack ​

readonly scriptStack: string