errors

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: BSD-3-Clause Imports: 1 Imported by: 2

Documentation

Overview

Package errors exports common error types without unnecessary dependencies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModuleError

type ModuleError interface {
	PublicError
	ModuleError() bool
}

ModuleError indicates that the error is caused by unsupported or malformed WebAssembly module.

func AsModuleError added in v0.35.0

func AsModuleError(err error) ModuleError

AsModuleError returns the error if it is a module error (ModuleError method returns true).

type PublicError

type PublicError interface {
	error
	PublicError() string
}

PublicError provides a message which can be used in communications. The Error() method returns a message suitable for internal logging etc.

If the PublicError methods an empty string, the error is effectively not public.

func AsPublicError added in v0.35.0

func AsPublicError(err error) PublicError

AsPublicError returns the error if it is public (PublicError method returns non-empty string).

type ResourceLimit

type ResourceLimit interface {
	PublicError
	ResourceLimit() bool
}

ResourceLimit was reached.

func AsResourceLimit added in v0.35.0

func AsResourceLimit(err error) ResourceLimit

AsResourceLimit returns the error if it is a resource limit error (ResourceLimit method returns true).

Directories

Path Synopsis
Package errordata helps with error serialization.
Package errordata helps with error serialization.

Jump to

Keyboard shortcuts

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