errtrace

package
v1.70.6 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package errtrace provides utilities to annotate errors.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Trace

func Trace(err error) error

Trace annotates the error message with the filename, line number and function name.

Example
package main

import (
	"fmt"

	"github.com/Vonage/gosrvlib/pkg/errtrace"
)

func main() {
	err := fmt.Errorf("example error")
	testErr := errtrace.Trace(err)

	fmt.Println(testErr)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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