[Pkg-javascript-commits] [node-leveldown] 196/492: InitializationError -> InitError to reduce line lengths

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:13:58 UTC 2014


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

andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.

commit a0a1d78db4d6e0c4b7e59b284defcbe535e07ecf
Author: Lars-Magnus Skog <lars.magnus.skog at gmail.com>
Date:   Sun Feb 3 05:05:42 2013 +0100

    InitializationError -> InitError to reduce line lengths
---
 lib/errors.js       | 17 +++++++++--------
 lib/levelup.js      |  3 +--
 test/simple-test.js |  5 +++--
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/lib/errors.js b/lib/errors.js
index 9337fe4..16bed84 100644
--- a/lib/errors.js
+++ b/lib/errors.js
@@ -1,6 +1,7 @@
 /* Copyright (c) 2012-2013 LevelUP contributors
  * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+ * MIT +no-false-attribs License
+ * <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
  */
 
 var errno = require('errno')
@@ -8,11 +9,11 @@ var errno = require('errno')
   , LevelUPError = errno.custom.createError('LevelUPError')
 
 module.exports = {
-    LevelUPError        : LevelUPError
-  , InitializationError : errno.custom.createError('InitializationError', LevelUPError)
-  , OpenError           : errno.custom.createError('OpenError', LevelUPError)
-  , ReadError           : errno.custom.createError('ReadError', LevelUPError)
-  , WriteError          : errno.custom.createError('WriteError', LevelUPError)
-  , NotFoundError       : errno.custom.createError('NotFoundError', LevelUPError)
-  , CloseError          : errno.custom.createError('CloseError', LevelUPError)
+    LevelUPError  : LevelUPError
+  , InitError     : errno.custom.createError('InitError', LevelUPError)
+  , OpenError     : errno.custom.createError('OpenError', LevelUPError)
+  , ReadError     : errno.custom.createError('ReadError', LevelUPError)
+  , WriteError    : errno.custom.createError('WriteError', LevelUPError)
+  , NotFoundError : errno.custom.createError('NotFoundError', LevelUPError)
+  , CloseError    : errno.custom.createError('CloseError', LevelUPError)
 }
diff --git a/lib/levelup.js b/lib/levelup.js
index c064b18..0bc16b4 100644
--- a/lib/levelup.js
+++ b/lib/levelup.js
@@ -62,8 +62,7 @@ var bridge       = require('bindings')('levelup.node')
       }
 
       if (typeof location != 'string') {
-        error = new errors.InitializationError(
-            'Must provide a location for the database')
+        error = new errors.InitError('Must provide a location for the database')
 
         if (callback)
           return callback(error)
diff --git a/test/simple-test.js b/test/simple-test.js
index 6693a66..26448bb 100644
--- a/test/simple-test.js
+++ b/test/simple-test.js
@@ -1,6 +1,7 @@
 /* Copyright (c) 2012-2013 LevelUP contributors
  * See list at <https://github.com/rvagg/node-levelup#contributing>
- * MIT +no-false-attribs License <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
+ * MIT +no-false-attribs License
+ * <https://github.com/rvagg/node-levelup/blob/master/LICENSE>
  */
 
 var buster  = require('buster')
@@ -18,7 +19,7 @@ buster.testCase('Basic API', {
   , 'levelup()': function () {
       assert.isFunction(levelup)
       assert.equals(levelup.length, 3) // location, options & callback arguments
-      assert.exception(levelup, 'InitializationError') // no location
+      assert.exception(levelup, 'InitError') // no location
     }
 
   , 'default options': function (done) {

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



More information about the Pkg-javascript-commits mailing list