How to catch a fatal error in Python 2.7?

marc nicole via Python-list <[email protected]> Mon, 9 Dec 2024 20:19:27 +0100
Newsgroups gmane.comp.python.general,gmane.comp.python.tutor
Message-ID <CAGJtH9RSph6W6tMePZYdYPCEmgL22VoDLMjfGWdjq=H+6hMR7g@mail.gmail.com>
Hello,

The fatal error exits the program with a code -1 while referencing the
memory address involved and nothing else.

How to catch it in Python 2.7?

PS: please not I am not talking about exceptions but an error resulting
from the disconnection of my bluetooth microphone abruptly and leading to
the halting of the whole program, I need to be able to do something when it
occurs.

Thanks for the help!