I am developing ncurses app in python. But everytime, when my second thread (or anything else) throw exception, or print som text, it mess my window.
Is there any option, how to catch this text and handle it properly, without ruining my awesome ncurses program design? 🙂
Thank you
First and foremost,
catchall appropriate exceptions at the entry to your threads’ call stacks. In all likelyhood, the slave threads should catch it in order to relay the exception (viaQueue, e.g.) to the display, or perhaps a log.Alternatively, you can suppress the printout of the default exception handler (though your question focuses on this aspect, it’s almost certainly not what you want):