mongo-drivergo.mongodb.org/mongo-driver/internal/errutil Index | Files

package errutil

import "go.mongodb.org/mongo-driver/internal/errutil"

Index

Functions

func UnwrapError

func UnwrapError(err error) error

UnwrapError attempts to unwrap the error down to its root cause.

func WrapError

func WrapError(inner error, message string) error

WrapError wraps an error with a message.

func WrapErrorf

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

WrapErrorf wraps an error with a message.

Types

type WrappedError

type WrappedError interface {
	// Message gets the basic message of the error.
	Message() string
	// Inner gets the inner error if one exists.
	Inner() error
}

WrappedError represents an error that contains another error.

Source Files

errutil.go

Version
v1.12.2
Published
Nov 8, 2023
Platform
linux/amd64
Imports
1 packages
Last checked
28 seconds ago

Tools for package owners.