errors

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidArgument          = newErrorType("invalid argument")
	ErrInvalidState             = newErrorType("invalid state")
	ErrInvalidHashField         = newErrorType("invalid hash field descriptor")
	ErrSerDesFailed             = newErrorType("(de)serialization failure")
	ErrVerificationFailed       = newErrorType("verification failed")
	ErrVerificationInconsistent = newErrorType("verification inconsistent")
	ErrTimeout                  = newErrorType("timeout")
	ErrPermissionDenied         = newErrorType("permission denied")
	ErrCancelled                = newErrorType("cancelled")
	ErrInconsistentData         = newErrorType("inconsistent data")
	ErrCriticalError            = newErrorType("critical error")
	ErrInsufficientData         = newErrorType("insufficient data")

	ErrOutOfSequence  = newErrorType("out of sequence")
	ErrBufferOverflow = newErrorType("buffer overflow")
	ErrEOS            = newErrorType("end of stream")
	ErrFileNotFound   = newErrorType("file not found")

	ErrNotImplemented = newErrorType("not implemented")
)

Functions

func ErrorCausedBy

func ErrorCausedBy(err error, cause error) bool

ErrorCausedBy checks if any error in error queue matches the given error Deprecated: use native error and errors.Is method

func Errorf

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

Errorf Creates a simple error from a format and arguments The error will also have a stack trace if enabled using errors.SetGenerateStackTraces(generate bool) Deprecated: use fmt.Errorf instead

func New

func New(message string) error

New Creates a simple error with message The error will also have a stack trace if enabled using errors.SetGenerateStackTraces(generate bool) Deprecated: use native go error

func SetGenerateStackTraces

func SetGenerateStackTraces(generate bool)

SetGenerateStackTraces Set whether to generate stack traces for errors or not

func Wrap

func Wrap(cause error, message string) error

Wrap Creates an error with message and another error as its cause The error will also have a stack trace if enabled using errors.SetGenerateStackTraces(generate bool) Deprecated: use native go errors and fmt.Errorf with %w or errors.Join instead

func Wrapf

func Wrapf(cause error, format string, a ...interface{}) error

Wrapf Creates an error from a format and arguments, along with another error as its cause The error will also have a stack trace if enabled using errors.SetGenerateStackTraces(generate bool) Deprecated: use native go errors and fmt.Errorf with %w instead

Types

type AlphabillError

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

AlphabillError is errors specific to Alphabill logic.

func (*AlphabillError) Error

func (e *AlphabillError) Error() string

func (*AlphabillError) Message

func (e *AlphabillError) Message() string

func (*AlphabillError) Unwrap

func (e *AlphabillError) Unwrap() error

type AlphabillErrorType

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

AlphabillErrorType If necessary we can add error codes etc. to this type later on

func FindErrorType

func FindErrorType(err error) *AlphabillErrorType

func (*AlphabillErrorType) Error

func (e *AlphabillErrorType) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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