pub enum CodeError {
Show 19 variants
ImportSectionNotFound,
MemoryEntryNotFound,
ExportSectionNotFound,
RequiredExportFnNotFound,
NonGearExportFnFound,
Validation,
Decode,
Instrumentation,
Encode,
StartSectionExists,
InvalidStaticPageCount,
StackEndInitialization,
DataSegmentInitialization,
StackEndOverlaps,
IncorrectGlobalIndex,
MutGlobalExport,
TypeSectionNotFound,
FunctionSectionNotFound,
InvalidExportFnSignature,
}Expand description
Instrumentation error.
Variants§
ImportSectionNotFound
The provided code doesn’t contain required import section.
MemoryEntryNotFound
The provided code doesn’t contain memory entry section.
ExportSectionNotFound
The provided code doesn’t contain export section.
RequiredExportFnNotFound
The provided code doesn’t contain the required init or handle export function.
NonGearExportFnFound
The provided code contains unnecessary function exports.
Validation
Validation by wasmparser failed.
Decode
Error occurred during decoding original program code.
Instrumentation
Error occurred during instrumentation WASM module.
Encode
Error occurred during encoding instrumented program.
StartSectionExists
We restrict start sections in smart contracts.
InvalidStaticPageCount
The provided code has invalid count of static pages.
StackEndInitialization
Unsupported initialization of gear stack end global variable.
DataSegmentInitialization
Unsupported initialization of data segment.
StackEndOverlaps
Pointer to the stack end overlaps data segment.
IncorrectGlobalIndex
Incorrect global export index. Can occur when export refers to not existing global index.
MutGlobalExport
Gear protocol restriction for now.
TypeSectionNotFound
The type section of the wasm module is not present.
FunctionSectionNotFound
The function section of the wasm module is not present.
InvalidExportFnSignature
The signature of an exported function is invalid.