1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

handling of errors on multi, now returns 'err' array type

This commit is contained in:
Thanasis Polychronakis
2013-04-18 22:25:58 +03:00
parent c7633bf738
commit ed57dcd9d5
2 changed files with 14 additions and 9 deletions

11
test.js
View File

@@ -320,6 +320,15 @@ tests.MULTI_7 = function () {
next(name);
};
tests.MULTI_EXCEPTION_1 = function() {
client.multi().set("foo").exec(function (err, reply) {
/* ... */
console.log('CB:', arguments);
});
// [Error: Error: ERR wrong number of arguments for 'set' command]
};
tests.FWD_ERRORS_1 = function () {
var name = "FWD_ERRORS_1";
@@ -615,7 +624,7 @@ tests.detect_buffers = function () {
assert.strictEqual("<Buffer 76 61 6c 20 31>", reply[0].inspect(), name);
assert.strictEqual("<Buffer 76 61 6c 20 32>", reply[1].inspect(), name);
});
// array of strings with undefined values (repro #344)
detect_client.hmget("hash key 2", "key 3", "key 4", function(err, reply) {
assert.strictEqual(null, err, name);