You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
396 B

3 years ago
package main
import (
"errs"
"fmt"
)
3 years ago
func printTrace (s errs.StackTrace) {
lf := s.Frames()
for i,f := range lf {
fmt.Printf("%d file %s line %d %s\n",i,f.File,f.LineNumber,f.FuncName)
}
3 years ago
}
3 years ago
func main() {
3 years ago
3 years ago
eA := errs.ErrCode("1")
eB := errs.ErrCode("2").ToErrTrace(0)
eM := errs.NewErrMetas(eA,errs.ErrMetasWithCause(eB),errs.ErrMetasWithStackTrace(0))
3 years ago
3 years ago
fmt.Print(eM.String())
3 years ago
}

Powered by TurnKey Linux.