Additional generator tests.
This commit is contained in:
parent
d7a5adb239
commit
12509eaf44
2 changed files with 40 additions and 24 deletions
|
|
@ -1,10 +1,14 @@
|
|||
package errfmt
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue