wasmruntime

package
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package wasmruntime contains internal symbols shared between modules for error handling. Note: This is named wasmruntime to avoid conflicts with the normal go module. Note: This only imports "api" as importing "wasm" would create a cyclic dependency.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRuntimeStackOverflow indicates that there are too many function calls,
	// and the Engine terminated the execution.
	ErrRuntimeStackOverflow = New("stack overflow")
	// ErrRuntimeInvalidConversionToInteger indicates the Wasm function tries to
	// convert NaN floating point value to integers during trunc variant instructions.
	ErrRuntimeInvalidConversionToInteger = New("invalid conversion to integer")
	// ErrRuntimeIntegerOverflow indicates that an integer arithmetic resulted in
	// overflow value. For example, when the program tried to truncate a float value
	// which doesn't fit in the range of target integer.
	ErrRuntimeIntegerOverflow = New("integer overflow")
	// ErrRuntimeIntegerDivideByZero indicates that an integer div or rem instructions
	// was executed with 0 as the divisor.
	ErrRuntimeIntegerDivideByZero = New("integer divide by zero")
	// ErrRuntimeUnreachable means "unreachable" instruction was executed by the program.
	ErrRuntimeUnreachable = New("unreachable")
	// ErrRuntimeOutOfBoundsMemoryAccess indicates that the program tried to access the
	// region beyond the linear memory.
	ErrRuntimeOutOfBoundsMemoryAccess = New("out of bounds memory access")
	// ErrRuntimeInvalidTableAccess means either offset to the table was out of bounds of table, or
	// the target element in the table was uninitialized during call_indirect instruction.
	ErrRuntimeInvalidTableAccess = New("invalid table access")
	// ErrRuntimeIndirectCallTypeMismatch indicates that the type check failed during call_indirect.
	ErrRuntimeIndirectCallTypeMismatch = New("indirect call type mismatch")
)

Functions

This section is empty.

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error is returned by a wasm.Engine during the execution of Wasm functions, and they indicate that the Wasm runtime state is unrecoverable.

func New

func New(text string) *Error

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL