Closed tom-seddon closed 3 years ago
I already have this in my code:
function printError(error: Error): never {
if (gFatalVerbose) {
process.stderr.write('Stack trace:\n');
process.stderr.write(error.stack + '\n');
}
process.stderr.write('FATAL: ' + error + '\n');
return process.exit(1);
}
process.on('uncaughtException', (error) => {
printError(error);
});
I was hoping that process.exit(1)
would just stop things dead, so I can see the stack trace, but the screen gets restored anyway.
Thanks,
--Tom
You can call screen.destroy()
prior to your process.exit(1)
call
Found this going through old issues looking for something... thanks for the note. I'm not working on that code any more (and I can't remember what I did about this...), but this sounds like a fix for my problem.
Thanks,
--Tom
When my program exits, the terminal's previous contents are restored. How do I prevent this when using TypeScript and
@types/blessed
?Thanks,
--Tom