beam: github.com/apache/beam/sdks/go/pkg/beam/internal/errors Index | Files

package errors

import "github.com/apache/beam/sdks/go/pkg/beam/internal/errors"

Package errors contains functionality for creating and wrapping errors with improved formatting compared to the standard Go error functionality.

Index

Package Files

errors.go

func Errorf Uses

func Errorf(format string, args ...interface{}) error

Errorf returns an error with a message formatted according to the format specifier.

func New Uses

func New(message string) error

New returns an error with the given message.

func SetTopLevelMsg Uses

func SetTopLevelMsg(err error, top string) error

SetTopLevelMsg returns a new error with the given top level message. The top level message is the first error message that gets printed when Error() is called on the returned error or any error wrapping it.

func SetTopLevelMsgf Uses

func SetTopLevelMsgf(err error, format string, args ...interface{}) error

SetTopLevelMsgf returns a new error with the given top level message according to the format specifier. The top level message is the first error message that gets printed when Error() is called on the returned error or any error wrapping it.

func WithContext Uses

func WithContext(err error, context string) error

WithContext returns a new error adding additional context to err.

func WithContextf Uses

func WithContextf(err error, format string, args ...interface{}) error

WithContextf returns a new error adding additional context to err according to the format specifier.

func Wrap Uses

func Wrap(err error, message string) error

Wrap returns a new error annotating err with a new message.

func Wrapf Uses

func Wrapf(err error, format string, args ...interface{}) error

Wrapf returns a new error annotating err with a new message according to the format specifier.

Package errors imports 3 packages (graph) and is imported by 41 packages. Updated 2020-06-16. Refresh now. Tools for package owners.