aerrors

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: Apache-2.0, MIT Imports: 4 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) uint8

Types

type ActorError

type ActorError interface {
	error
	IsFatal() bool
	RetCode() uint8
}

func Absorb

func Absorb(err error, retCode uint8, 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 uint8, message string) ActorError

New creates a new non-fatal error

func Newf

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

Newf creates a new non-fatal error

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