From 6cf690afcc02ee7bb318a676fec6025aa21b2e6f Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Tue, 29 Apr 2014 12:43:29 -0300 Subject: [PATCH] improve BIP32 error message --- lib/BIP32.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/BIP32.js b/lib/BIP32.js index ba9699e..bec938c 100644 --- a/lib/BIP32.js +++ b/lib/BIP32.js @@ -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);