From 72f814b01607731c9c13f68e2f73c292259a25f9 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Fri, 6 Jan 2023 17:23:03 -0500 Subject: [PATCH] Change error handling to show in web log --- functions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions.js b/functions.js index 96d76f7..d3316ad 100644 --- a/functions.js +++ b/functions.js @@ -236,7 +236,7 @@ switch (process.env.ONPI) { console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`); main(gpio); }).catch(rej => { - console.error(`[${(Date.now() - config.timestamps.procStart)/1000}] E: Error during initialization: ${rej}`); + console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] E: Error during initialization: ${rej}`); process.exit(1); }); break; @@ -247,12 +247,12 @@ switch (process.env.ONPI) { console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`); main(gpio); }).catch(rej => { - console.error(`[${(Date.now() - config.timestamps.procStart)/1000}] E: Error during initialization: ${rej}`); + console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] E: Error during initialization: ${rej}`); process.exit(1); }); break; default: - console.error(`[${Date.now() - config.timestamps.procStart}] E: Problem with ENV file.`); + console.log(`[${Date.now() - config.timestamps.procStart}] E: Problem with ENV file.`); process.exit(1); break; }