You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
Improve error stacks in development and debug mode
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
var debug_mode = require('../').debug_mode;
|
||||
var betterStackTraces = process.env.NODE_ENV && process.env.NODE_ENV.toUpperCase() === 'DEVELOPMENT' || debug_mode;
|
||||
|
||||
function Command (command, args, callback, call_on_write) {
|
||||
this.command = command;
|
||||
@@ -7,6 +9,9 @@ function Command (command, args, callback, call_on_write) {
|
||||
this.buffer_args = false;
|
||||
this.callback = callback;
|
||||
this.call_on_write = call_on_write;
|
||||
if (betterStackTraces) {
|
||||
this.error = new Error();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Command;
|
||||
|
Reference in New Issue
Block a user