You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
fix unescaped exception in Multi.exec
This commit is contained in:
7
index.js
7
index.js
@@ -1037,7 +1037,12 @@ Multi.prototype.exec = function (callback) {
|
|||||||
if (typeof cur[cur.length - 1] === "function") {
|
if (typeof cur[cur.length - 1] === "function") {
|
||||||
cur[cur.length - 1](err);
|
cur[cur.length - 1](err);
|
||||||
} else {
|
} else {
|
||||||
throw new Error(err);
|
if (callback) {
|
||||||
|
callback(new Error(err));
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
throw new Error(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self.queue.splice(index, 1);
|
self.queue.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user