Commit ab540d6e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b3628b5f
// Copyright (C) 2016-2018 Nexedi SA and Contributors. // Copyright (C) 2016-2020 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com> // Kirill Smelkov <kirr@nexedi.com>
// //
// This program is free software: you can Use, Study, Modify and Redistribute // This program is free software: you can Use, Study, Modify and Redistribute
...@@ -1283,8 +1283,10 @@ func (e *ConnError) Error() string { ...@@ -1283,8 +1283,10 @@ func (e *ConnError) Error() string {
return fmt.Sprintf("%s .%d: %s: %s", e.Link, e.ConnId, e.Op, e.Err) return fmt.Sprintf("%s .%d: %s: %s", e.Link, e.ConnId, e.Op, e.Err)
} }
func (e *LinkError) Cause() error { return e.Err } func (e *LinkError) Cause() error { return e.Err }
func (e *ConnError) Cause() error { return e.Err } func (e *LinkError) Unwrap() error { return e.Err }
func (e *ConnError) Cause() error { return e.Err }
func (e *ConnError) Unwrap() error { return e.Err }
func (nl *NodeLink) err(op string, e error) error { func (nl *NodeLink) err(op string, e error) error {
if e == nil { if e == nil {
......
// Copyright (C) 2017-2019 Nexedi SA and Contributors. // Copyright (C) 2017-2020 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com> // Kirill Smelkov <kirr@nexedi.com>
// //
// This program is free software: you can Use, Study, Modify and Redistribute // This program is free software: you can Use, Study, Modify and Redistribute
...@@ -97,9 +97,8 @@ type RecordError struct { ...@@ -97,9 +97,8 @@ type RecordError struct {
Err error // actual error Err error // actual error
} }
func (e *RecordError) Cause() error { func (e *RecordError) Cause() error { return e.Err }
return e.Err func (e *RecordError) Unwrap() error { return e.Err }
}
func (e *RecordError) Error() string { func (e *RecordError) Error() string {
// XXX omit path: when .Err already contains it (e.g. when it is os.PathError)? // XXX omit path: when .Err already contains it (e.g. when it is os.PathError)?
......
// Copyright (C) 2016-2019 Nexedi SA and Contributors. // Copyright (C) 2016-2020 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com> // Kirill Smelkov <kirr@nexedi.com>
// //
// This program is free software: you can Use, Study, Modify and Redistribute // This program is free software: you can Use, Study, Modify and Redistribute
...@@ -316,9 +316,8 @@ func (e *OpError) Error() string { ...@@ -316,9 +316,8 @@ func (e *OpError) Error() string {
return s return s
} }
func (e *OpError) Cause() error { func (e *OpError) Cause() error { return e.Err }
return e.Err func (e *OpError) Unwrap() error { return e.Err }
}
// IStorage is the interface provided by opened ZODB storage. // IStorage is the interface provided by opened ZODB storage.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment