Skip to content

EvalError

PromptScript API


Defined in: eval/src/errors.ts:153

Base of every error the eval package throws.

Extends

Extended by

Constructors

Constructor

new EvalError(message, code, options?): EvalError

Defined in: eval/src/errors.ts:154

Parameters

message

string

code

EvalCode

options?
location?

SourceLocation

Returns

EvalError

Overrides

PSError.constructor

Properties

cause?

readonly optional cause?: Error

Defined in: core/src/errors/base.ts:56

Original error if wrapping another error

Inherited from

PSError.cause


code

readonly code: string

Defined in: core/src/errors/base.ts:52

Error code

Inherited from

PSError.code


location?

readonly optional location?: SourceLocation

Defined in: core/src/errors/base.ts:54

Source location where error occurred

Inherited from

PSError.location

Methods

format()

format(): string

Defined in: core/src/errors/base.ts:79

Format error for display.

Returns

string

Inherited from

PSError.format


toJSON()

toJSON(): Record<string, unknown>

Defined in: core/src/errors/base.ts:92

Convert to JSON-serializable object.

Returns

Record<string, unknown>

Inherited from

PSError.toJSON