Discover Packages
github.com/Vonage/gosrvlib
pkg
errtrace
package
Version:
v1.99.6
Opens a new window with list of versions in this module.
Published: Aug 19, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package errtrace provides a function to automatically trace Go errors. Each
error is annotated with the filename, line number, and function name where it
was created.
Trace annotates the error message with the filename, line number, and function name.
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:
Source Files
¶
Click to show internal directories.
Click to hide internal directories.