2020-10-14 15:26:50 +01:00
|
|
|
// Copyright (C) 2020 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package dbx
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spacemonkeygo/monkit/v3"
|
|
|
|
"github.com/zeebo/errs"
|
|
|
|
)
|
|
|
|
|
|
|
|
//go:generate sh gen.sh
|
|
|
|
|
|
|
|
var mon = monkit.Package()
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
// catch dbx errors
|
2021-04-28 09:06:17 +01:00
|
|
|
class := errs.Class("multinodedb dbx")
|
2020-10-14 15:26:50 +01:00
|
|
|
WrapErr = func(e *Error) error {
|
|
|
|
if e.Code == ErrorCode_NoRows {
|
|
|
|
return e.Err
|
|
|
|
}
|
|
|
|
return class.Wrap(e)
|
|
|
|
}
|
|
|
|
}
|