jet/internal/utils/errfmt/errfmt.go
Eli Ribble 34e5dcbb17
All checks were successful
/ test (push) Successful in 3s
Switch to hosting on source.gleipnir.technology
2026-05-14 16:26:47 +00:00

14 lines
309 B
Go

package errfmt
import (
"source.gleipnir.technology/Gleipnir/jet/internal/utils/is"
"strings"
)
// Trace returns well formatted wrapped error trace string
func Trace(err error) string {
if is.Nil(err) {
return ""
}
return "Error trace:\n" + " - " + strings.Replace(err.Error(), ": ", ":\n - ", -1)
}