Turn meme stderr string into an error

This commit is contained in:
TheEssem 2020-01-05 18:02:24 -06:00
parent 2ff250ecc7
commit 77ca68f39b

View file

@ -17,7 +17,7 @@ exports.run = async (message, args) => {
if (error) throw error;
});
child.stderr.once("data", (error) => {
if (error) throw error.toString();
if (error) throw new Error(error.toString());
});
child.stdout.once("close", () => {
const data = Buffer.concat(chunks);