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¶
Overrides¶
Error.constructor
Defined in¶
Properties¶
led¶
• led: LogicErrorDetails
Defined in¶
lines¶
• lines: number
= 5
Defined in¶
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¶
stack¶
• Optional
stack: string
Overrides¶
Error.stack
Defined in¶
teal_line¶
• teal_line: number
= 0
Defined in¶
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