mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-09 19:32:24 +08:00
remove debugerrors
We now consider debugerrors harmful: we've run into cases where debugerror.Wrap() hid valuable error information (err == io.EOF?). I've removed them from the main code, but left them in some tests. Go errors are lacking, but unfortunately, this isn't the solution. It is possible that debugerros.New or debugerrors.Errorf should remain still (i.e. only remove debugerrors.Wrap) but we don't use these errors often enough to keep.
This commit is contained in:
@ -6,7 +6,6 @@ import (
|
||||
|
||||
lock "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/camlistore/lock"
|
||||
"github.com/ipfs/go-ipfs/util"
|
||||
"github.com/ipfs/go-ipfs/util/debugerror"
|
||||
)
|
||||
|
||||
// LockFile is the filename of the daemon lock, relative to config dir
|
||||
@ -15,7 +14,7 @@ const LockFile = "daemon.lock"
|
||||
|
||||
func Lock(confdir string) (io.Closer, error) {
|
||||
c, err := lock.Lock(path.Join(confdir, LockFile))
|
||||
return c, debugerror.Wrap(err)
|
||||
return c, err
|
||||
}
|
||||
|
||||
func Locked(confdir string) bool {
|
||||
|
Reference in New Issue
Block a user