werror

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(err error) error

Wrap wraps the given error with the current file, line, and function.

func WrapWithContext

func WrapWithContext(err error, context map[string]interface{}) error

WrapWithContext wraps the given error with the current file, line, function, and the given context.

func WrapWithMsg

func WrapWithMsg(err error, msg string) error

Types

type Wrapper

type Wrapper struct {
	// contains filtered or unexported fields
}

Wrapper wraps an error with the file, line, and function where the error was wrapped and an optional context map.

func (Wrapper) Error

func (w Wrapper) Error() string

Error returns the wrapped error's message.

func (Wrapper) File

func (w Wrapper) File() string

File returns the file where the error was wrapped.

func (Wrapper) Function

func (w Wrapper) Function() string

Function returns the function where the error was wrapped.

func (Wrapper) Line

func (w Wrapper) Line() int

Line returns the line where the error was wrapped.

func (Wrapper) Unwrap

func (w Wrapper) Unwrap() error

Unwrap returns the wrapped error.

Jump to

Keyboard shortcuts

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