diff options
Diffstat (limited to 'index.js')
-rwxr-xr-x | index.js | 9 |
1 files changed, 9 insertions, 0 deletions
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) }) |