From e9ccfa2fd4221ddff4950d5180ee5c8fb0bf8117 Mon Sep 17 00:00:00 2001 From: Florrie Date: Mon, 25 Feb 2019 12:06:27 -0400 Subject: Metadata (stored, throttle, status, and more) --- index.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'index.js') diff --git a/index.js b/index.js index e46bfa0..6a71611 100755 --- a/index.js +++ b/index.js @@ -22,7 +22,16 @@ process.stdout.setMaxListeners(Infinity) process.stderr.setMaxListeners(Infinity) process.on('unhandledRejection', error => { + console.error(ansi.setForeground(ansi.C_RED) + "** There was an uncatched error! **" + ansi.resetAttributes()) + console.error("Don't worry, your music files are all okay.") + console.error("This just means there was a bug in mtui.") + console.error("In order to verify that the program won't run weirdly, it has stopped.") + console.error(ansi.setForeground(ansi.C_RED) + "Error stack:" + ansi.resetAttributes()) console.error(error.stack) + console.error(ansi.setForeground(ansi.C_RED) + "Error object:" + ansi.resetAttributes()) + console.error(error) + console.error("(End of error log.)") + process.stdout.write(ansi.cleanCursor()) process.exit(1) }) -- cgit 1.3.0-6-gf8a5