errors

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

func Errorf(c ErrorCode, w v1alpha1.WorkflowID, msgFmt string, args ...interface{}) error

func Matches

func Matches(err error, code ErrorCode) bool

func Wrapf

func Wrapf(c ErrorCode, w v1alpha1.WorkflowID, cause error, msgFmt string, args ...interface{}) error

Types

type ErrorCode

type ErrorCode string
const (
	IllegalStateError     ErrorCode = "IllegalStateError"
	BadSpecificationError ErrorCode = "BadSpecificationError"
	CausedByError         ErrorCode = "CausedByError"
	RuntimeExecutionError ErrorCode = "RuntimeExecutionError"
	EventRecordingError   ErrorCode = "ErrorRecordingError"
)

func GetErrorCode

func GetErrorCode(err error) (code ErrorCode, isWorkflowError bool)

func (ErrorCode) String

func (e ErrorCode) String() string

type ErrorMessage

type ErrorMessage = string

type WorkflowError

type WorkflowError struct {
	errors.StackTrace
	Code     ErrorCode
	Message  ErrorMessage
	Workflow v1alpha1.WorkflowID
}

func (*WorkflowError) Error

func (w *WorkflowError) Error() string

func (*WorkflowError) Is

func (w *WorkflowError) Is(target error) bool

type WorkflowErrorWithCause

type WorkflowErrorWithCause struct {
	*WorkflowError
	// contains filtered or unexported fields
}

func (*WorkflowErrorWithCause) Cause

func (w *WorkflowErrorWithCause) Cause() error

func (*WorkflowErrorWithCause) Error

func (w *WorkflowErrorWithCause) Error() string

func (*WorkflowErrorWithCause) Is

func (w *WorkflowErrorWithCause) Is(target error) bool

func (*WorkflowErrorWithCause) Unwrap

func (w *WorkflowErrorWithCause) Unwrap() error

Jump to

Keyboard shortcuts

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