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
|
||||
const env = utils.clone(process.env);
|
||||
env.LD_LIBRARY_PATH = path.join(config.odm_path, "SuperBuild", "install", "lib");
|
||||
let childProcess = spawn(command, commandArgs, { env });
|
||||
|
||||
try{
|
||||
let childProcess = spawn(command, commandArgs, { env });
|
||||
childProcess
|
||||
.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()));
|
||||
|
||||
return childProcess;
|
||||
}catch(e){
|
||||
// Catch errors such as ENOMEM
|
||||
logger.warn(`Error: ${e.message}`);
|
||||
done(e);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue