rterror

package module
v0.0.0-...-94c48b4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 5 Imported by: 1

README

rterror

This library prepends additional runtime information to error messages, in order to make it easier to identify where the error originates at a glance.

Example

An error that occurred in package strconv, in the function ParseInt, with a maximum identifier length for package and function names of 4 would output:

[strc_pi] parsing "a": invalid syntax 

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrependErrorWithRuntimeInfo

func PrependErrorWithRuntimeInfo(err error, msg string, args ...interface{}) error

PrependErrorWithRuntimeInfo, prepends to an error, a shorthand descriptor for the name of the package

and function where the error occurred. To make it easier to identify the error location

func PrintPrependErrorWithRuntimeInfo

func PrintPrependErrorWithRuntimeInfo(err error, msg string, args ...interface{})

PrintPrependErrorWithRuntimeInfo, like `PrependErrorWithRuntimeInfo` but just prints the error

Types

This section is empty.

Jump to

Keyboard shortcuts

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