errtrace

package
v1.90.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package errtrace provides a function to automatically trace 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 (
	"errors"
	"fmt"

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

func main() {
	err := errors.New("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