kopia lustrzana https://github.com/OpenDroneMap/NodeODM
Catch ENOMEM
rodzic
488ba227d8
commit
b1b92ce132
|
@ -61,16 +61,21 @@ function makeRunner(command, args, requiredOptions = [], outputTestFile = null){
|
||||||
// Launch
|
// Launch
|
||||||
const env = utils.clone(process.env);
|
const env = utils.clone(process.env);
|
||||||
env.LD_LIBRARY_PATH = path.join(config.odm_path, "SuperBuild", "install", "lib");
|
env.LD_LIBRARY_PATH = path.join(config.odm_path, "SuperBuild", "install", "lib");
|
||||||
let childProcess = spawn(command, commandArgs, { env });
|
|
||||||
|
try{
|
||||||
childProcess
|
let childProcess = spawn(command, commandArgs, { env });
|
||||||
.on('exit', (code, signal) => done(null, code, signal))
|
childProcess
|
||||||
.on('error', done);
|
.on('exit', (code, signal) => done(null, code, signal))
|
||||||
|
.on('error', done);
|
||||||
childProcess.stdout.on('data', chunk => outputReceived(chunk.toString()));
|
|
||||||
childProcess.stderr.on('data', chunk => outputReceived(chunk.toString()));
|
childProcess.stdout.on('data', chunk => outputReceived(chunk.toString()));
|
||||||
|
childProcess.stderr.on('data', chunk => outputReceived(chunk.toString()));
|
||||||
return childProcess;
|
return childProcess;
|
||||||
|
}catch(e){
|
||||||
|
// Catch errors such as ENOMEM
|
||||||
|
logger.warn(`Error: ${e.message}`);
|
||||||
|
done(e);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue