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 ¶
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).