I have some code that handles an exception, and I want to do something specific only if it\'s a specific exception, and only in debug mode. So for example:
try:
You can name specific exceptions in Python:
try: stuff() except KeyboardInterrupt: sys.exit() except Exception: normal_handling()