Skip to content

Commit

Permalink
Merge pull request multiformats#108 from multiformats/fix/improve-inc…
Browse files Browse the repository at this point in the history
…onsistent-length-err

improve inconsistent length error
  • Loading branch information
Stebalien authored May 9, 2019
2 parents c242156 + fa7c103 commit 24c7810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion multihash.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type ErrInconsistentLen struct {
}

func (e ErrInconsistentLen) Error() string {
return fmt.Sprintf("multihash length inconsistent: %v", e.dm)
return fmt.Sprintf("multihash length inconsistent: expected %d, got %d", e.dm.Length, len(e.dm.Digest))
}

// constants
Expand Down

0 comments on commit 24c7810

Please sign in to comment.