ioerror

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package ioerror represents the imported interface "wasi:io/error@0.2.0".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error cm.Resource

Error represents the imported resource "wasi:io/error@0.2.0#error".

A resource which represents some error information.

The only method provided by this resource is `to-debug-string`, which provides some human-readable information about the error.

In the `wasi:io` package, this resource is returned through the `wasi:io/streams/stream-error` type.

To provide more specific error information, other interfaces may provide functions to further "downcast" this error into more specific error information. For example, `error`s returned in streams derived from filesystem types to be described using the filesystem's own error-code type, using the function `wasi:filesystem/types/filesystem-error-code`, which takes a parameter `borrow<error>` and returns `option<wasi:filesystem/types/error-code>`.

The set of functions which can "downcast" an `error` into a more concrete type is open.

resource error

func (Error) ResourceDrop

func (self Error) ResourceDrop()

ResourceDrop represents the imported resource-drop for resource "error".

Drops a resource handle.

func (Error) ToDebugString

func (self Error) ToDebugString() (result string)

ToDebugString represents the imported method "to-debug-string".

Returns a string that is suitable to assist humans in debugging this error.

WARNING: The returned string should not be consumed mechanically! It may change across platforms, hosts, or other implementation details. Parsing this string is a major platform-compatibility hazard.

to-debug-string: func() -> string

Jump to

Keyboard shortcuts

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