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
readonlymember:string
Defined in: script-host/src/errors.ts:25
module
readonlymodule:string
Defined in: script-host/src/errors.ts:22
owner
readonlyowner: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
readonlyscriptMessage:string
Defined in: script-host/src/errors.ts:6
scriptName
readonlyscriptName:string
Defined in: script-host/src/errors.ts:5
scriptStack
readonlyscriptStack: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
What the engine reported.
Returns
object
error
error:
string
scriptMessage
readonlyscriptMessage:string
scriptName
readonlyscriptName:string
scriptStack
readonlyscriptStack:string