errs

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain added in v1.3.0

type Chain []error

Chain holds multiple errors in chain.

func (*Chain) AddIf added in v1.3.0

func (c *Chain) AddIf(err error)

AddIf adds error to chain if not nil.

func (Chain) GetError added in v1.3.0

func (c Chain) GetError() error

GetError returns error as `g8rswimmer/error-chain` if contains any error.

type PolicyViolationError

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

PolicyViolationError is an error type for policy violation.

func NewErrPolicyViolation

func NewErrPolicyViolation(key string) PolicyViolationError

NewErrUnexpectedInputEnd cerate a new error.

func (PolicyViolationError) Error

func (err PolicyViolationError) Error() string

Error returns the error message text.

type UnexpectedInputEndError

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

UnexpectedInputEndError is an error type for unexpected input end.

func NewErrUnexpectedInputEnd

func NewErrUnexpectedInputEnd(tokenType string) UnexpectedInputEndError

NewErrUnexpectedInputEnd cerate a new error.

func (UnexpectedInputEndError) Error

func (err UnexpectedInputEndError) Error() string

Error returns the error message text.

type UnexpectedInputError

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

UnexpectedInputError is an error type for unexpected input.

func NewErrUnexpectedInput

func NewErrUnexpectedInput(data interface{}) UnexpectedInputError

NewErrUnexpectedInput cerate a new error.

func (UnexpectedInputError) Error

func (err UnexpectedInputError) Error() string

Error returns the error message text.

type UnexpectedTokenError

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

UnexpectedTokenError is an error type for unexpected token.

func NewErrUnexpectedToken

func NewErrUnexpectedToken(position int, token string) UnexpectedTokenError

NewErrUnexpectedToken cerate a new error.

func (UnexpectedTokenError) Error

func (err UnexpectedTokenError) Error() string

Error returns the error message text.

type UnexpectedTokenTypeError

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

UnexpectedTokenTypeError.TokenType is an error type for unexpected token type.

func NewErrUnexpectedTokenType

func NewErrUnexpectedTokenType(position int, actual, expected string) UnexpectedTokenTypeError

NewErrUnexpectedTokenType cerate a new error.

func (UnexpectedTokenTypeError) Error

func (err UnexpectedTokenTypeError) Error() string

Error returns the error message text.

Jump to

Keyboard shortcuts

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