derrors

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package derrors provides the error-wrapping helper used by the vendored godoc rendering code.

It is a trimmed copy of github.com/goplus/llcppg/internal/godoc/internal/derrors containing only Wrap, which is all the rendering path needs. The full pkgsite package also carries HTTP status mapping and crash reporting that llcppg's local documentation server does not use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(errp *error, format string, args ...any)

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

Example:

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

See Add for an equivalent function that does not allow the result to be unwrapped.

Types

This section is empty.

Jump to

Keyboard shortcuts

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