[Pkg-javascript-commits] [node-keygrip] 44/68: throw errors, not strings

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Fri Jun 27 22:13:27 UTC 2014


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to branch master
in repository node-keygrip.

commit 37f50c155a2f1a5b0e8d186fe79f623008b52bac
Author: Jed Schmidt <where at jed.is>
Date:   Sat Dec 21 09:15:54 2013 -0500

    throw errors, not strings
---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index d2c75a8..5d2ea6b 100644
--- a/index.js
+++ b/index.js
@@ -6,7 +6,7 @@ function Keygrip(keys, algorithm, encoding) {
   if (!(this instanceof Keygrip)) return new Keygrip(keys, algorithm, encoding)
 
   if (!keys || !(0 in keys)) {
-    throw "Keys must be provided."
+    throw new Error("Keys must be provided.")
   }
 
   function sign(data, key) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-keygrip.git



More information about the Pkg-javascript-commits mailing list