From a4c2cc6dd4e5246ef348d49430ae3462f7c092f5 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Tue, 8 Apr 2014 21:53:33 +1000 Subject: [PATCH] Removes pointless error utility function --- src/address.js | 3 +-- src/util.js | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/address.js b/src/address.js index 354dda8..9a010dd 100644 --- a/src/address.js +++ b/src/address.js @@ -1,7 +1,6 @@ var base58 = require('./base58') var base58check = require('./base58check') var convert = require('./convert') -var error = require('./util').error var mainnet = require('./network').mainnet.addressVersion function Address(bytes, version) { @@ -25,7 +24,7 @@ function Address(bytes, version) { this.version = version || mainnet } else { - error('invalid or unrecognized input') + throw new Error('Invalid or unrecognized input') } } else { diff --git a/src/util.js b/src/util.js index 9cbc541..6ec6d15 100644 --- a/src/util.js +++ b/src/util.js @@ -7,7 +7,3 @@ exports.sha256ripe160 = function (data) { var wordArray = RIPEMD160(SHA256(convert.bytesToWordArray(data))) return convert.wordArrayToBytes(wordArray) } - -exports.error = function (msg) { - throw new Error(msg) -}