Change error handling to show in web log
This commit is contained in:
parent
85bf00a35a
commit
72f814b016
@ -236,7 +236,7 @@ switch (process.env.ONPI) {
|
|||||||
console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`);
|
console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`);
|
||||||
main(gpio);
|
main(gpio);
|
||||||
}).catch(rej => {
|
}).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);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
@ -247,12 +247,12 @@ switch (process.env.ONPI) {
|
|||||||
console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`);
|
console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: ${res}`);
|
||||||
main(gpio);
|
main(gpio);
|
||||||
}).catch(rej => {
|
}).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);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
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);
|
process.exit(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user