derrors

package
v0.0.0-...-cf650ac Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: BSD-3-Clause, CC-BY-4.0 Imports: 2 Imported by: 0

Documentation

Overview

Package derrors defines internal error values to categorize the different types error semantics supported by x/vulndb.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Report

func Report(err error)

Report uses the errorreporting API to report an error.

func SetReportingClient

func SetReportingClient(c *errorreporting.Client)

SetReportingClient sets an errorreporting client, for use by Report.

func Wrap

func Wrap(errp *error, format string, args ...interface{})

Wrap adds context to the error and allows unwrapping the result to recover the original error.

Example:

defer derrors.Wrap(&err, "copy(%s, %s)", dst, src)

func WrapAndReport

func WrapAndReport(errp *error, format string, args ...interface{})

WrapAndReport calls Wrap followed by Report.

Types

This section is empty.

Jump to

Keyboard shortcuts

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