mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-08 11:56:46 +01:00
Wrap all errors with tracerr
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user