Add error callback to ogr command while spawning

This commit is contained in:
Daniel García Aubert 2017-04-11 09:43:25 +02:00
parent 2276187c27
commit d60e2107af

View File

@ -169,9 +169,9 @@ OgrFormat.prototype.toOGR = function(options, out_format, out_filename, callback
var child = spawn(ogr2ogr, ogrargs);
/*
console.log('ogr2ogr ' + _.map(ogrargs, function(x) { return "'" + x + "'"; }).join(' '));
*/
child.on('error', function (err) {
next(err);
});
var stdout = '';
child.stdout.on('data', function(data) {