aerrors

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0, MIT Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFatal

func IsFatal(err ActorError) bool

func RetCode

func RetCode(err ActorError) exitcode.ExitCode

Types

type ActorError

type ActorError interface {
	error
	IsFatal() bool
	RetCode() exitcode.ExitCode
}

func Absorb

func Absorb(err error, retCode exitcode.ExitCode, msg string) ActorError

Absorb takes and error and makes in not fatal ActorError

func Escalate

func Escalate(err error, msg string) ActorError

Escalate takes and error and escalates it into a fatal error

func Fatal

func Fatal(message string, args ...interface{}) ActorError

func Fatalf

func Fatalf(format string, args ...interface{}) ActorError

func HandleExternalError

func HandleExternalError(err error, msg string) ActorError

func New

func New(retCode exitcode.ExitCode, message string) ActorError

New creates a new non-fatal error

func Newf

func Newf(retCode exitcode.ExitCode, format string, args ...interface{}) ActorError

Newf creates a new non-fatal error

func NewfSkip added in v0.3.0

func NewfSkip(skip int, retCode exitcode.ExitCode, format string, args ...interface{}) ActorError

func Wrap

func Wrap(err ActorError, message string) ActorError

Wrap extens chain of errors with a message

func Wrapf

func Wrapf(err ActorError, format string, args ...interface{}) ActorError

Wrapf extens chain of errors with a message

Jump to

Keyboard shortcuts

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