errwrappers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: MIT Imports: 6 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

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

func Empty

func Empty() *Collection

func New

func New(capacity int) *Collection

func NewWithItem

func NewWithItem(capacity int, variation errtype.Variation) *Collection

func (*Collection) Add

func (collection *Collection) Add(variation errtype.Variation) *Collection

func (*Collection) AddUsingMessages

func (collection *Collection) AddUsingMessages(
	variation errtype.Variation,
	messages ...string,
) *Collection

Same category multiple errorwrapper.New gets created for each message.

func (*Collection) AddUsingMsg

func (collection *Collection) AddUsingMsg(
	variation errtype.Variation,
	additionalMessage string,
) *Collection

func (*Collection) Adds

func (collection *Collection) Adds(variations ...errtype.Variation) *Collection

For each variation errorwrapper.New will be created and stored.

func (*Collection) Dispose

func (collection *Collection) Dispose()

After dispose nothing will work, everything be removed from memory.

func (*Collection) GetAsError

func (collection *Collection) GetAsError() error

func (*Collection) Handle

func (collection *Collection) Handle()

Skip if no error.

func (*Collection) HandleWithMsg

func (collection *Collection) HandleWithMsg(msg string)

Skip if no error.

func (*Collection) IsEmpty

func (collection *Collection) IsEmpty() bool

func (*Collection) Length

func (collection *Collection) Length() int

func (*Collection) List

func (collection *Collection) List() *[]errorwrapper.Wrapper

func (*Collection) Log

func (collection *Collection) Log()

Skip if no error.

func (*Collection) LogFatal

func (collection *Collection) LogFatal()

Skip if no error.

func (*Collection) String

func (collection *Collection) String() string

func (*Collection) StringPtr

func (collection *Collection) StringPtr() *string

func (*Collection) Strings

func (collection *Collection) Strings() []string

Jump to

Keyboard shortcuts

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