'use strict';

// Load libraries
const logger = require('../../log');

// On conversion error
module.exports = function(err, stdout, stderr) {

  // DEBUG
  logger.error(err);

};

@@ -136,45 +136,197 @@
 derr
-) %7B%0A%0A  // DEBUG%0A  logger.error(err);%0A
+, job, metadata, resolve, reject) %7B%0A%0A  // Close progress bar%0A  this.progressBar.terminate();%0A%0A  // DEBUG%0A  logger.error(err);%0A%0A  // Send back to main thread with error%0A  return reject(err);
 %0A%7D;%0A

Update conversion error handling and rejection