...

Package errors

import "github.com/chaos-mesh/chaos-mesh/pkg/workflow/errors"
Overview
Index

Overview ▾

Variables

FIXME: use thaterror

var (
    ErrNoSuchNode                     = New("no such node")
    ErrNoSuchTemplate                 = New("no such template")
    ErrParseTemplateFailed            = New("failed to parse certain type of template")
    ErrNoMoreTemplateInSerialTemplate = New("no more template could schedule in serial template")
)

type NoMoreTemplateInSerialTemplateError

type NoMoreTemplateInSerialTemplateError struct {
    Op  string
    Err error

    WorkflowName string
    TemplateName string
    NodeName     string
}

func NewNoMoreTemplateInSerialTemplateError

func NewNoMoreTemplateInSerialTemplateError(op, workflowName, templateName, nodeName string) *NoMoreTemplateInSerialTemplateError

func (*NoMoreTemplateInSerialTemplateError) Error

func (e *NoMoreTemplateInSerialTemplateError) Error() string

func (*NoMoreTemplateInSerialTemplateError) Unwrap

func (e *NoMoreTemplateInSerialTemplateError) Unwrap() error

type NoSuchTemplateError

type NoSuchTemplateError struct {
    Op  string
    Err error

    WorkflowName          string
    TemplateName          string
    AllAvailableTemplates []string
}

func NewNoSuchTemplateError

func NewNoSuchTemplateError(op, workflowName, templateName string) *NoSuchTemplateError

func NewNoSuchTemplateErrorInTemplates

func NewNoSuchTemplateErrorInTemplates(op, templateName string, allAvailableTemplates []string) *NoSuchTemplateError

func (*NoSuchTemplateError) Error

func (e *NoSuchTemplateError) Error() string

func (*NoSuchTemplateError) Unwrap

func (e *NoSuchTemplateError) Unwrap() error

type NoSuchTreeNodeError

type NoSuchTreeNodeError struct {
    Op  string
    Err error

    WorkflowName   string
    ParentNodeName string
}

func NewNoSuchTreeNodeError

func NewNoSuchTreeNodeError(op string, parentNodeName string, workflowName string) *NoSuchTreeNodeError

func (*NoSuchTreeNodeError) Error

func (e *NoSuchTreeNodeError) Error() string

func (*NoSuchTreeNodeError) Unwrap

func (e *NoSuchTreeNodeError) Unwrap() error

type ParseTemplateFailedError

type ParseTemplateFailedError struct {
    Op  string
    Err error

    Target  string
    RawType string
}

func NewParseSerialTemplateFailedError

func NewParseSerialTemplateFailedError(op string, raw interface{}) *ParseTemplateFailedError

func (*ParseTemplateFailedError) Error

func (e *ParseTemplateFailedError) Error() string

func (*ParseTemplateFailedError) Unwrap

func (e *ParseTemplateFailedError) Unwrap() error

type WorkflowError

type WorkflowError struct {
    Message string
}

func New

func New(message string) *WorkflowError

func (*WorkflowError) Error

func (it *WorkflowError) Error() string