PSError
Defined in: core/src/errors/base.ts:50
Base error class for all PromptScript errors.
Extends
Error
Extended by
ParseErrorResolveErrorValidationErrorMissingParamErrorUnknownParamErrorParamTypeMismatchErrorUndefinedVariableErrorTargetCapabilitiesErrorOutputPlanPathErrorEvalErrorPromptFormatError
Constructors
Constructor
new PSError(
message,code,options?):PSError
Defined in: core/src/errors/base.ts:58
Parameters
message
string
code
string
options?
cause?
Error
location?
Returns
PSError
Overrides
Error.constructor
Properties
cause?
readonlyoptionalcause?:Error
Defined in: core/src/errors/base.ts:56
Original error if wrapping another error
Overrides
Error.cause
code
readonlycode:string
Defined in: core/src/errors/base.ts:52
Error code
location?
readonlyoptionallocation?:SourceLocation
Defined in: core/src/errors/base.ts:54
Source location where error occurred
Methods
format()
format():
string
Defined in: core/src/errors/base.ts:79
Format error for display.
Returns
string
toJSON()
toJSON():
Record<string,unknown>
Defined in: core/src/errors/base.ts:92
Convert to JSON-serializable object.
Returns
Record<string, unknown>