1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Emit errors instead of throwing them

Thrown errors might kill the users app. By emitting the errors the user is able to catch all errors in one place without the app going down
This commit is contained in:
Ruben Bridgewater
2015-09-07 14:54:08 +02:00
parent c6ae7832a3
commit 4f0443cdd4
6 changed files with 43 additions and 45 deletions

View File

@@ -114,7 +114,7 @@ describe("The 'eval' method", function () {
client.evalsha(sha, 0, helper.isString('eval get sha test', done));
});
it('throws an error if SHA does not exist', function (done) {
it('returns an error if SHA does not exist', function (done) {
helper.serverVersionAtLeast.call(this, client, [2, 5, 0]);
client.evalsha('ffffffffffffffffffffffffffffffffffffffff', 0, helper.isError(done));
});