From 8d3246391574d51a692271ef89ef785a1c7ca9c2 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Wed, 17 Mar 2021 19:09:53 -0400 Subject: [PATCH] Abiword: Fix logging of conversion failure --- src/node/utils/Abiword.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/node/utils/Abiword.js b/src/node/utils/Abiword.js index debb77db9..348c76a0d 100644 --- a/src/node/utils/Abiword.js +++ b/src/node/utils/Abiword.js @@ -81,11 +81,8 @@ if (os.type().indexOf('Windows') > -1) { abiword.stdin.write(`convert ${task.srcFile} ${task.destFile} ${task.type}\n`); stdoutCallback = (err) => { callback(); - try { - task.callback(err); - } catch (e) { - console.error('Abiword File failed to convert', e); - } + if (err != null) console.error('Abiword File failed to convert', err); + task.callback(err); }; };