errors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorCode

type ErrorCode = string
const (
	TaskFailedWithError        ErrorCode = "TaskFailedWithError"
	DownstreamSystemError      ErrorCode = "DownstreamSystemError"
	TaskFailedUnknownError     ErrorCode = "TaskFailedUnknownError"
	BadTaskSpecification       ErrorCode = "BadTaskSpecification"
	TaskEventRecordingFailed   ErrorCode = "TaskEventRecordingFailed"
	MetadataAccessFailed       ErrorCode = "MetadataAccessFailed"
	MetadataTooLarge           ErrorCode = "MetadataTooLarge"
	PluginInitializationFailed ErrorCode = "PluginInitializationFailed"
	CacheFailed                ErrorCode = "AutoRefreshCacheFailed"
	RuntimeFailure             ErrorCode = "RuntimeFailure"
)

func GetErrorCode

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

type TaskError

type TaskError struct {
	Code    string
	Message string
}

func Errorf

func Errorf(errorCode ErrorCode, msgFmt string, args ...interface{}) *TaskError

func (*TaskError) Error

func (e *TaskError) Error() string

type TaskErrorWithCause

type TaskErrorWithCause struct {
	*TaskError
	// contains filtered or unexported fields
}

func Wrapf

func Wrapf(errorCode ErrorCode, err error, msgFmt string, args ...interface{}) *TaskErrorWithCause

func (*TaskErrorWithCause) Cause

func (e *TaskErrorWithCause) Cause() error

func (*TaskErrorWithCause) Error

func (e *TaskErrorWithCause) Error() string

Jump to

Keyboard shortcuts

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