I am running some code for a robot, and it will keep running until I manually kill the process. OR if the code unexpectedly hits an error like a SYntaxError or other such errors/Exceptions and crashes out.
I was wondering if it is possible to set up some alerting or beeping noise when my code crashes out.
My aim is to look away from my screen and only check it if the process has stopped running. If there are any other common ways to achieve the above, that would be great!
I can set up a beeping noise using python libraries, but what is a challenge is to get it to execute when the code breaks out unexpectedly.