feature(socket) getSpawn: add error sending

This commit is contained in:
coderaiser 2014-01-27 11:06:28 -05:00
parent d4a56f6089
commit 762da4bb64

View file

@ -242,16 +242,18 @@
}
function getSpawn(pCommand, options, callback) {
var send, cmd,
var send, cmd, error,
args = pCommand.split(' ');
pCommand = args.shift();
Util.tryCatchLog(function() {
cmd = spawn(pCommand, args, options);
error = Util.tryCatchLog(function() {
cmd = spawn(pCommand, args, options);
});
if (cmd) {
if (!cmd)
send(error + '', null);
else {
send = function(error, data) {
var exec = {
stderr: error,