I\'ve got a situation where I\'m catching a specific exception type, inspecting the exception\'s message to check if it\'s actually an exception I want to catch, and then re
Just do:
raise
instead of raise e
. See the tutorial section on raising exceptions, and also the language reference on raise statements:
If no expressions are present, raise re-raises the last exception that was active in the current scope. If no exception is active in the current scope, a TypeError exception is raised indicating that this is an error (if running under IDLE, a Queue.Empty exception is raised instead).