Helios API/ API Reference/ Classes/

UserError

UserErrors are generated when the user of Helios makes a mistake (eg. a syntax error).

Hierarchy

  • Error

    UserError

Index

Constructors

constructor

new UserError(message?)

Parameters

NameType
message?string

Inherited from

Error.constructor

Properties

message

message: string

Inherited from

Error.message

name

name: string

Inherited from

Error.name

stack

Optional stack: string

Inherited from

Error.stack

Accessors

context

get context(): any

Filled with CBOR hex representations of Datum, Redeemer and ScriptContext by validation scripts throwing errors during tx.finalize(); and Redeemer and ScriptContext by minting scripts throwing errors.

Returns

any

Methods

catch

Static catch<T>(fn, verbose?): undefined | T

Catches any UserErrors thrown inside 'fn()`. Dumps the error

Type parameters

Name
T

Parameters

NameType
fn() => T
verbose?boolean

Returns

undefined | T

isReferenceError

Static isReferenceError(e): boolean

Parameters

NameType
eError

Returns

boolean

isTypeError

Static isTypeError(e): boolean

Parameters

NameType
eError

Returns

boolean