From 32124f47e12a628b63c180cb623683b0aefc23d0 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Tue, 7 Jan 2014 23:29:50 -0800 Subject: [PATCH] throw an error object --- lib/b64.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/b64.js b/lib/b64.js index b0fa171..8c89460 100644 --- a/lib/b64.js +++ b/lib/b64.js @@ -34,7 +34,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var i, j, l, tmp, placeHolders, arr; if (b64.length % 4 > 0) { - throw 'Invalid string. Length must be a multiple of 4'; + throw new Error('Invalid string. Length must be a multiple of 4') } // the number of equal signs (place holders)