errors

package
v8.12.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMethodNotImplemented is returned when a certain method is not implemented.
	// It can be used instead of panicking for operations that are not intended to halt execution.
	ErrMethodNotImplemented error = errors.New("method no implemented")

	// ErrInvalidURL is returned when an invalid URL callback value is passed on a request.
	ErrInvalidURL = errors.New("invalid URL")
)

Functions

func WithFunctionContext

func WithFunctionContext(err error, errMsg string, skip int) error

WithFunctionContext wraps an error with information about the function that generated the error. `skip` is the number of stack frames that need to be removed to reach the function that generated the error. If this function is called to wrap an error on the function that generated the error, then `skip` should be set to 1. Higher values of `skip` are necessary to create error wrapping functions that make use of this function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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