- attached exception.diff
re-raise of exception loses stack trace information
In mapper.py, there's a spot that catches an exception, assigns it to e, and possibly re-raises e. This has the side of effect of losing the stack trace information that originally raised e. A better method is to just cause "raise" with no arguments (instead of "raise e"). "raise" with no arguments has the effect of re-raising the exception, but shows the actual stack trace to where the error occurred in the user's program, instead of pointing to some irrelevant line in mapper.py.
Patch attached.
I'd write a test case, but I'm an SQL Alchemy newbie and don't yet understand what I'm doing wrong that's causing the exception to begin with...
Comments (2)
-
Account Deleted -
repo owner - changed status to resolved
the behavior of this has been improved in 0.4 and reraises properly using an argument-less "raise" of the exception which just occured.
- Log in to comment
Change re-raise of exception to use stack trace information of the original exception