errors

package
v0.0.0-...-f70f7d2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package errors intentionally mirrors the standard "errors" module. All packages on Koala should use this.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cause

func Cause(err error) error

Cause only wraps errors.Cause

func Errorf

func Errorf(format string, args ...interface{}) error

Errorf only wraps errors.Errorf

func IsIllegalArgumentError

func IsIllegalArgumentError(err error) bool

IsIllegalArgumentError verifies if error is an IllegalStateError

func IsIllegalStateError

func IsIllegalStateError(err error) bool

IsIllegalStateError verifies if error is an IllegalStateError

func IsNotAuthorizedError

func IsNotAuthorizedError(err error) bool

IsNotAuthorizedError verifies if error is an NotAuthorizedError

func IsNotFoundError

func IsNotFoundError(err error) bool

IsNotFoundError verifies if error is a NotFoundError

func IsRelationshipError

func IsRelationshipError(err error) bool

IsRelationshipError verifies if error is an RelationshipError

func IsRootError

func IsRootError(e error) bool

IsRootError verifies if the error is a RuntimeError

func New

func New(m string) error

New only wraps errors.New

func NewIllegalArgumentError

func NewIllegalArgumentError(err error) error

NewIllegalArgumentError creates an IllegalArgumentError instance

func NewIllegalStateError

func NewIllegalStateError(err error) error

NewIllegalStateError creates an IllegalStateError instance

func NewNotAuthorizedError

func NewNotAuthorizedError(err error) error

NewNotAuthorizedError creates a NotAuthorizedError instance

func NewNotFoundError

func NewNotFoundError(err error) error

NewNotFoundError creates an error from NotFoundError

func NewRelationshipError

func NewRelationshipError(err error) error

NewRelationshipError creates an error from RelationshipError

func Wrap

func Wrap(err error, m string) error

Wrap only wraps errors.Wrap

Types

type BaseError

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

BaseError represents the base error

func NewBaseError

func NewBaseError(err error) BaseError

NewBaseError creates a BaseError instance

func (BaseError) Error

func (e BaseError) Error() string

Error implements error.Error

func (BaseError) Format

func (e BaseError) Format(s fmt.State, verb rune)

Format formats the error message

func (BaseError) GetStack

func (e BaseError) GetStack() string

GetStack implements RootError

type IllegalArgumentError

type IllegalArgumentError struct {
	BaseError
}

IllegalArgumentError represents an illegal argument error It implements the RuntimeError interface

type IllegalStateError

type IllegalStateError struct {
	BaseError
}

IllegalStateError represents an illegal state error It implements the RuntimeError interface

type NotAuthorizedError

type NotAuthorizedError struct {
	BaseError
}

NotAuthorizedError represents the error for not authorized logic

type NotFoundError

type NotFoundError struct {
	BaseError
}

NotFoundError represents a not found error It implements the RuntimeError interface

type RelationshipError

type RelationshipError struct {
	BaseError
}

RelationshipError represents a relationship error

type RootError

type RootError interface {
	// Returns the stack trace without the error message.
	GetStack() string

	Error() string
}

RootError interface exposes additional information about the error

Jump to

Keyboard shortcuts

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