Documentation
¶
Index ¶
- Variables
- func Errorf(f string, args ...interface{}) error
- func MapError(err error) error
- func New(res interface{}) error
- type Error
- func (e Error) Contains(err interface{}) bool
- func (e Error) Copy() Error
- func (e Error) Error() string
- func (e Error) Exit()
- func (e Error) Format(f fmt.State, c rune)
- func (e Error) FormatError(p xerrors.Printer) error
- func (e *Error) GetLog() bool
- func (e *Error) SetLog(log bool)
- func (e Error) String() string
- func (e Error) ToGRPC(code codes.Code) error
- func (e Error) Wrap(err interface{}) Error
- func (e Error) Wrapf(str string, args ...interface{}) Error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is a generic error for things that don't exist. ErrNotFound = New("not found") // ErrInvalidAuth is for authentication events that do not succeed. ErrInvalidAuth = New("invalid authentication") // ErrRunCanceled is thrown to github when the run is canceled. ErrRunCanceled = New("run canceled by user intervention") )
Functions ¶
Types ¶
type Error ¶
type Error struct {
Errs []string `json:"errors"`
Frames []xerrors.Frame `json:"-"`
Log bool `json:"log"`
}
Error encapsulates a series of errors.
func (Error) Contains ¶
Contains checks if e contains err. Strings and errors are supported; otherwise it will return false.
func (Error) Exit ¶
func (e Error) Exit()
Exit exits the program leveraging the error for output before exiting with error code 1. If DEBUG is set, it will output a stack trace.
func (Error) FormatError ¶
FormatError implements xerrors.Formatter and allows it to provide extended detail.
func (*Error) GetLog ¶
GetLog returns the state of the log argument; for usage by error reporting utilities.
func (Error) ToGRPC ¶
ToGRPC converts an error to a coded GRPC error, useful in returns from API handlers.
Click to show internal directories.
Click to hide internal directories.