A common mistake is to re-raise the exception by specifying the instance of the exception again, for example:
except Exception, ex:
Discards the initial trace information and starts a new one. Instead, you should do this without explicitly specifying an exception (i.e., use a bare raise ):
except Exception, ex:
This saves all the raw information in the stack trace. See this section in the docs for a somewhat useful background.
source share