errs

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: BSD-2-Clause Imports: 3 Imported by: 2

Documentation

Overview

Package errs declares error types used as exception causes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArityMismatch

type ArityMismatch struct {
	What      string
	ValidLow  int
	ValidHigh int
	Actual    int
}

ArityMismatch encodes an error where the expected number of values is out of the valid range.

func (ArityMismatch) Error

func (e ArityMismatch) Error() string

type BadValue

type BadValue struct {
	What   string
	Valid  string
	Actual string
}

BadValue encodes an error where the value does not meet a requirement. For out-of-range errors, use OutOfRange.

func (BadValue) Error

func (e BadValue) Error() string

Error implements the error interface.

type OutOfRange

type OutOfRange struct {
	What      string
	ValidLow  string
	ValidHigh string
	Actual    string
}

OutOfRange encodes an error where a value is out of its valid range.

func (OutOfRange) Error

func (e OutOfRange) Error() string

Error implements the error interface.

type ReaderGone

type ReaderGone struct {
}

ReaderGone is raised by the writer in a pipeline when the reader end has terminated. It could be raised directly by builtin commands, or when an external command gets terminated by SIGPIPE after Elvish detects the read end of the pipe has exited earlier.

func (ReaderGone) Error

func (e ReaderGone) Error() string

Error implements the error interface.

type SetReadOnlyVar

type SetReadOnlyVar struct {
	// Name of the read-only variable. This field is initially empty, and
	// populated later when context information is available.
	VarName string
}

SetReadOnlyVar is returned by the Set method of a read-only variable.

func (SetReadOnlyVar) Error

func (e SetReadOnlyVar) Error() string

Error implements the error interface.

Jump to

Keyboard shortcuts

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