errors

package
v2.0.0-...-072ea80 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 3 Imported by: 3

Documentation

Overview

Package errors defines error types used in the package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrInvalidJob

type ErrInvalidJob struct{}

ErrInvalidJob indicates that the job is invalid.

func (ErrInvalidJob) Error

func (ErrInvalidJob) Error() string

type ErrMultiple

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

ErrMultiple contains multiple errors.

func NewErrMultiple

func NewErrMultiple(err error, errs ...error) ErrMultiple

NewErrMultiple construct error instance from the list of errors given.

func (ErrMultiple) Error

func (err ErrMultiple) Error() string

func (ErrMultiple) Len

func (err ErrMultiple) Len() int

Len returns the count of errors contained.

func (ErrMultiple) List

func (err ErrMultiple) List() []error

List returns the list of errors contained.

func (ErrMultiple) Top

func (err ErrMultiple) Top() error

Top returns the top most error from the contained list.

type ErrPanic

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

ErrPanic contains information about panic.

func NewErrPanic

func NewErrPanic(data interface{}) ErrPanic

NewErrPanic constructs new instance of ErrPanic.

func (ErrPanic) Data

func (err ErrPanic) Data() interface{}

Data returns the data contained in panic caused the error.

func (ErrPanic) Error

func (err ErrPanic) Error() string

type ErrTimeout

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

ErrTimeout is thrown with Cancel if no panic trigger is provided to Timeout.

func NewErrTimeout

func NewErrTimeout(id interface{}, at time.Time) ErrTimeout

NewErrTimeout constructs new instance of ErrTimeout.

func (ErrTimeout) At

func (err ErrTimeout) At() time.Time

At returns the time when the timeout happened.

func (ErrTimeout) Error

func (err ErrTimeout) Error() string

func (ErrTimeout) ID

func (err ErrTimeout) ID() interface{}

ID returns the ID of the timeout happened.

Jump to

Keyboard shortcuts

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