MCPcopy Create free account
hub / github.com/nsf/gocode / print_backtrace

Function print_backtrace

utils.go:184–199  ·  view source on GitHub ↗
(err interface{})

Source from the content-addressed store, hash-verified

182var g_backtrace_mutex sync.Mutex
183
184func print_backtrace(err interface{}) {
185 g_backtrace_mutex.Lock()
186 defer g_backtrace_mutex.Unlock()
187 fmt.Printf("panic: %v\n", err)
188 i := 2
189 for {
190 pc, file, line, ok := runtime.Caller(i)
191 if !ok {
192 break
193 }
194 f := runtime.FuncForPC(pc)
195 fmt.Printf("%d(%s): %s:%d\n", i-1, f.Name(), file, line)
196 i++
197 }
198 fmt.Println("")
199}
200
201//-------------------------------------------------------------------------
202// File reader goroutine

Callers 3

server_auto_completeFunction · 0.85
update_packagesFunction · 0.85
get_other_package_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected