error

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2021 License: Apache-2.0 Imports: 4 Imported by: 56

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(m string) error

Create a new wrapped error.

func Wrap

func Wrap(err error) error

Wrap an error. Returns `err` when err is `nil` or *Error.

Types

type Error

type Error struct {
	// contains filtered or unexported fields
}

Error. Wraps a root cause error and captures the stack.

func (Error) Error

func (e Error) Error() string

Error description.

func (Error) Stack

func (e Error) Stack() string

Error stack trace. Format:

package.Function()
  file:line
package.Function()
  file:line
...

func (Error) Unwrap

func (e Error) Unwrap() error

Unwrap the error.

Jump to

Keyboard shortcuts

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