Skip to content

Commit 21850e7

Browse files
authored
chore: include edsWidth in error message (#245)
Closes #243
1 parent 14c9be4 commit 21850e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

extendeddatasquare.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"context"
77
"encoding/json"
88
"errors"
9+
"fmt"
910

1011
"golang.org/x/sync/errgroup"
1112
)
@@ -264,7 +265,7 @@ func (eds *ExtendedDataSquare) Width() uint {
264265
// extended data square.
265266
func validateEdsWidth(edsWidth uint) error {
266267
if edsWidth%2 != 0 {
267-
return errors.New("square width must be even")
268+
return fmt.Errorf("extended data square width %v must be even", edsWidth)
268269
}
269270

270271
return nil

0 commit comments

Comments
 (0)