Skip to content

BaseError

Base class for custom errors in TEVM. This class is abstract and should be extended by other error classes.

Implements

Abstract

Extends

  • Error

Extended by

Constructors

new BaseError()

new BaseError(shortMessage, args?, _tag?, code?): BaseError

Parameters

shortMessage: string

A short, human-readable summary of the error.

args?: BaseErrorParameters= {}

Additional parameters for the error.

_tag?: string= 'BaseError'

Internal tag for the error.

code?: number= 0

Error code analogous to the code in JSON RPC error.

Returns

BaseError

Overrides

Error.constructor

Source

packages/errors/src/ethereum/BaseError.js:44

Properties

_tag

_tag: string

Source

packages/errors/src/ethereum/BaseError.js:83


cause

cause: any

Inherited from

Error.cause

Source

packages/errors/src/ethereum/BaseError.js:115


code

code: number

Source

packages/errors/src/ethereum/BaseError.js:113


details

details: string

Source

packages/errors/src/ethereum/BaseError.js:92


docsPath

docsPath: undefined | string

Source

packages/errors/src/ethereum/BaseError.js:97


message

message: string

Inherited from

Error.message

Source

node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts:1077


metaMessages

metaMessages: undefined | string[]

Source

packages/errors/src/ethereum/BaseError.js:101


name

name: string

Inherited from

Error.name

Source

node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts:1076


shortMessage

shortMessage: string

Source

packages/errors/src/ethereum/BaseError.js:105


stack?

optional stack: string

Inherited from

Error.stack

Source

node_modules/.pnpm/typescript@5.4.5/node_modules/typescript/lib/lib.es5.d.ts:1078


version

version: string

Source

packages/errors/src/ethereum/BaseError.js:109


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Optional override for formatting stack traces

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Parameters

err: Error

stackTraces: CallSite[]

Returns

any

Inherited from

Error.prepareStackTrace

Source

node_modules/.pnpm/@types+node@20.14.2/node_modules/@types/node/globals.d.ts:28


stackTraceLimit

static stackTraceLimit: number

Inherited from

Error.stackTraceLimit

Source

node_modules/.pnpm/@types+node@20.14.2/node_modules/@types/node/globals.d.ts:30

Methods

walk()

walk(fn?): unknown

Walks through the error chain.

Parameters

fn?: Function

A function to execute on each error in the chain.

Returns

unknown

The first error that matches the function, or the original error.

Source

packages/errors/src/ethereum/BaseError.js:138


captureStackTrace()

captureStackTrace(targetObject, constructorOpt)

static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

targetObject: object

constructorOpt?: Function

Returns

void

Inherited from

Error.captureStackTrace

Source

node_modules/.pnpm/@types+node@20.14.2/node_modules/@types/node/globals.d.ts:21

captureStackTrace(targetObject, constructorOpt)

static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

targetObject: object

constructorOpt?: Function

Returns

void

Inherited from

Error.captureStackTrace

Source

node_modules/.pnpm/bun-types@1.1.12/node_modules/bun-types/globals.d.ts:1613