Wrap all errors with tracerr

This commit is contained in:
Eduard S
2020-11-30 12:58:36 +01:00
parent 879af66a2a
commit ced42634da
59 changed files with 1324 additions and 1268 deletions

View File

@@ -9,6 +9,8 @@ import (
"encoding/binary"
"errors"
"math/big"
"github.com/hermeznetwork/tracerr"
)
var (
@@ -112,7 +114,7 @@ func NewFloat16(f *big.Int) (Float16, error) {
if res.BigInt().Cmp(f) == 0 {
return res, nil
}
return res, ErrRoundingLoss
return res, tracerr.Wrap(ErrRoundingLoss)
}
// NewFloat16Floor encodes a big.Int integer as a Float16, rounding down in