(err interface{})
| 182 | var g_backtrace_mutex sync.Mutex |
| 183 | |
| 184 | func 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 |
no outgoing calls
no test coverage detected