errors

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrExit uint64 = iota + 1
	ErrInvalid
	ErrFile
	ErrMemoryAllocation
	ErrWrite
	ErrResourceNotFound
	ErrResourceNotAccessible
	ErrFileNotFound
	ErrDecodingJSON
	ErrDecodingYAML
	ErrEncodingJSON
	ErrEncodingYAML
	ErrConfig
)

Variables

View Source
var (
	ErrExitMessage                  = "error encountered"
	ErrInvalidMessage               = "invalid or missing arguments"
	ErrFileMessage                  = "could not read/write file"
	ErrWriteMessage                 = "could not write result"
	ErrMemoryAllocationMessage      = "could not allocate memory"
	ErrResourceNotFoundMessage      = "ocm resource not found"
	ErrResourceNotAccessibleMessage = "ocm resource not accessible"
	ErrFileNotFoundMessage          = "file not found"
	ErrDecodingJSONMessage          = "json is not valid"
	ErrDecodingYAMLMessage          = "yaml is not valid"
	ErrEncodingJSONMessage          = "json is not valid"
	ErrEncodingYAMLMessage          = "yaml is not valid"
	ErrConfigMessage                = "config is not valid"
)

Functions

func Check

func Check(result []uint64) error

Check examines whether the exit code matches a defined error and if so returns an error type.

func CheckCode

func CheckCode(result []uint64) uint64

CheckCode examines whether the exit code matches an defined error and if so returns the WasmError.

func GetMessage

func GetMessage(err uint64) string

GetMessage examines whether the exit code matches an defined error and if so returns the WasmError.

Types

This section is empty.

Jump to

Keyboard shortcuts

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