pub enum CodeError {
Show 16 variants
ImportSectionNotFound,
MemoryEntryNotFound,
ExportSectionNotFound,
RequiredExportFnNotFound,
NonGearExportFnFound,
Decode,
GasInjection,
StackLimitInjection,
Encode,
StartSectionExists,
InvalidStaticPageCount,
StackEndInitialization,
DataSegmentInitialization,
StackEndOverlaps,
IncorrectGlobalIndex,
MutGlobalExport,
}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.
Decode
Error occurred during decoding original program code.
The provided code was a malformed Wasm bytecode or contained unsupported features (atomics, simd instructions, etc.).
GasInjection
Error occurred during injecting gas metering instructions.
This might be due to program contained unsupported/non-deterministic instructions (floats, manual memory grow, etc.).
StackLimitInjection
Error occurred during stack height instrumentation.
Encode
Error occurred during encoding instrumented program.
The only possible reason for that might be OOM.
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.