Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (15 sloc) 248 Bytes
package libp2p
import (
"fmt"
"runtime"
)
func traceError(err error, skip int) error {
if err == nil {
return nil
}
_, file, line, ok := runtime.Caller(skip + 1)
if !ok {
return err
}
return fmt.Errorf("%s:%d: %s", file, line, err)
}
You can’t perform that action at this time.