errors

package
v0.21.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func As added in v0.20.0

func As(err error, target any) bool

func Code

func Code(e error) codes.Code

Code - returns a nitric api error code from an error or Unknown if the error was not a nitric api error

func Is added in v0.20.0

func Is(err error, target error) bool

Types

type ErrorFactory

type ErrorFactory = func(c codes.Code, msg string, cause error) error

func ErrorsWithScope

func ErrorsWithScope(scope string, args map[string]interface{}) ErrorFactory

ErrorsWithScope - Returns a new reusable error factory with the given scope

type PluginError

type PluginError struct {
	Code   codes.Code
	Msg    string
	Cause  error
	Plugin string
	Args   map[string]interface{}
}

func (*PluginError) Error

func (p *PluginError) Error() string

func (*PluginError) Unwrap

func (p *PluginError) Unwrap() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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