Skip to content

Create Publication

We are looking for publications that demonstrate building dApps or smart contracts!
See the full list of Gitcoin bounties that are eligible for rewards.

types logic error.LogicError

@algorandfoundation/algokit-utils / types/logic-error / LogicError

Class: LogicError

types/logic-error.LogicError

Wraps key functionality around processing logic errors

Hierarchy

  • Error

LogicError

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new LogicError(errorDetails, program, map): LogicError

Create a new logic error object.

Parameters
Name Type Description
errorDetails LogicErrorDetails The details of the logic error
program string[] The TEAL source code, split by line
map SourceMap The source map of the TEAL source code
Returns

LogicError

Overrides

Error.constructor

Defined in

src/types/logic-error.ts:54

Properties

led

led: LogicErrorDetails

Defined in

src/types/logic-error.ts:42


lines

lines: number = 5

Defined in

src/types/logic-error.ts:44


message

message: string

Inherited from

Error.message

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1076


name

name: string

Inherited from

Error.name

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1075


program

program: string[]

Defined in

src/types/logic-error.ts:43


stack

Optional stack: string

Overrides

Error.stack

Defined in

src/types/logic-error.ts:46


teal_line

teal_line: number = 0

Defined in

src/types/logic-error.ts:45


prepareStackTrace

Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

See

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

Type declaration

▸ (err, stackTraces): any

Optional override for formatting stack traces

Parameters
Name Type
err Error
stackTraces CallSite[]
Returns

any

See

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

Inherited from

Error.prepareStackTrace

Defined in

node_modules/@types/node/globals.d.ts:11


stackTraceLimit

Static stackTraceLimit: number

Inherited from

Error.stackTraceLimit

Defined in

node_modules/@types/node/globals.d.ts:13

Methods

captureStackTrace

captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters
Name Type
targetObject object
constructorOpt? Function
Returns

void

Inherited from

Error.captureStackTrace

Defined in

node_modules/@types/node/globals.d.ts:4


parseLogicError

parseLogicError(error): undefined | LogicErrorDetails

Takes an error message and parses out the details of any logic errors in there.

Parameters
Name Type Description
error any The error message to parse
Returns

undefined | LogicErrorDetails

The logic error details if any, or undefined

Defined in

src/types/logic-error.ts:28