improve BIP32 error message

This commit is contained in:
Manuel Araoz 2014-04-29 12:43:29 -03:00
parent 1959ce953c
commit 6cf690afcc
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ var BIP32 = function(bytes) {
if (typeof bytes === "string") {
var decoded = base58.decode(bytes);
if (decoded.length != 82)
throw new Error("Not enough data");
throw new Error('Not enough data, expected 82 and received '+decoded.length);
var checksum = decoded.slice(78, 82);
bytes = decoded.slice(0, 78);