Stack test
This commit is contained in:
parent
031e85ed62
commit
a2c18bcc50
6
pkg.go
6
pkg.go
@ -6,7 +6,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"path"
|
"path"
|
||||||
"runtime"
|
"runtime"
|
||||||
"runtime/debug"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Error struct {
|
type Error struct {
|
||||||
@ -22,9 +21,8 @@ var (
|
|||||||
baseDirLength int
|
baseDirLength int
|
||||||
)
|
)
|
||||||
|
|
||||||
func Init() {
|
func init() {
|
||||||
debug.PrintStack()
|
_, file, _, _ := runtime.Caller(3)
|
||||||
_, file, _, _ := runtime.Caller(1)
|
|
||||||
fmt.Printf("--\nWRAPPED_ERROR: %s\n--\n", file)
|
fmt.Printf("--\nWRAPPED_ERROR: %s\n--\n", file)
|
||||||
dir := path.Dir(file)
|
dir := path.Dir(file)
|
||||||
dirBase := path.Dir(dir)
|
dirBase := path.Dir(dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user