error

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: BSD-3-Clause Imports: 0 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller

type Caller interface {
	File() string
	Line() int
	Ok() bool
	Pc() uintptr
	String() string
}

Caller defines an interface to runtime caller results.

type Code

type Code int

Code defines an error code type.

type Error

type Error interface {
	// Code returns the associated error code. A value of 0 should be
	// considered uncoded.
	Code() Code
	// Caller returns the runtime caller information for this error.
	Caller() Caller
	// Err returns the original error
	Err() error
	// Error implements standard library compatibility. Error should return the
	// string associated with the error code, or the error message if there
	// isn't one
	Error() string
	// String is an alias of Error.
	String() string
	// Msg returns the original error message.
	Msg() string
	// Trace returns the full stack trace of this error.
	Trace() Trace
}

Error defines a slightly more robust error interface than the standard library.

type Trace

type Trace []Caller

Trace defines an error trace.

Jump to

Keyboard shortcuts

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