forked from TrueCloudLab/frostfs-node
[#1969] local_object_storage: Simplify logic error construction
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
fcdbf5e509
commit
56de2f1363
17 changed files with 25 additions and 36 deletions
|
@ -1,10 +1,17 @@
|
|||
package logicerr
|
||||
|
||||
import "errors"
|
||||
|
||||
// Logical is a wrapper for logical errors.
|
||||
type Logical struct {
|
||||
err error
|
||||
}
|
||||
|
||||
// New returns simple error with a provided error message.
|
||||
func New(msg string) Logical {
|
||||
return Wrap(errors.New(msg))
|
||||
}
|
||||
|
||||
// Error implements the error interface.
|
||||
func (e Logical) Error() string {
|
||||
return e.err.Error()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue