errors

package
v0.0.0-...-9451de5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package errors provides facilities with error handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositeError

type CompositeError struct {
	Base    error
	Message string
}

func (*CompositeError) Error

func (err *CompositeError) Error() string

type ConflictError

type ConflictError ValidationError

func (*ConflictError) Error

func (err *ConflictError) Error() string

type HTTP

type HTTP struct {
	// Status code.
	Code int

	// Message explaining what went wrong.
	Message string
}

HTTP represents an HTTP error. It implements the error interface.

Each HTTP error has a Code and a message explaining what went wrong.

func (*HTTP) Error

func (e *HTTP) Error() string

func (*HTTP) StatusCode

func (e *HTTP) StatusCode() int

type MultiError

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

func NewMultiError

func NewMultiError(errs ...error) *MultiError

func (*MultiError) Add

func (m *MultiError) Add(err error)

func (*MultiError) Error

func (m *MultiError) Error() string

func (*MultiError) Format

func (m *MultiError) Format(s fmt.State, verb rune)

func (*MultiError) Len

func (m *MultiError) Len() int

func (*MultiError) ToError

func (m *MultiError) ToError() error

type NotAuthorizedError

type NotAuthorizedError ValidationError

func (*NotAuthorizedError) Error

func (err *NotAuthorizedError) Error() string

type ValidationError

type ValidationError struct {
	Message string
}

ValidationError is an error implementation used whenever a validation failure occurs.

func (*ValidationError) Error

func (err *ValidationError) Error() string

Jump to

Keyboard shortcuts

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