errors

package
v0.0.0-...-4ed146b Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	error
	Kind() ErrorKind
}

Error is an error that can be thrown during runtime. When implementing the specification, maybe this layer will be reduced to the ThrowXXXError function objects.

func NewRangeError

func NewRangeError(msg string) Error

NewRangeError creates a new range error with the given error.

func NewReferenceError

func NewReferenceError(msg string) Error

NewReferenceError creates a new reference error with the given error.

func NewTypeError

func NewTypeError(msg string) Error

NewTypeError creates a new type error with the given error.

type ErrorKind

type ErrorKind uint8

ErrorKind is the type of error an error can have.

const (
	ErrorKindTypeError ErrorKind = iota
	ErrorKindReferenceError
	ErrorKindRangeError
)

Available error types used in the specification.

Jump to

Keyboard shortcuts

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