4 ms·
If you don't want the older exception, why are you giving it to the constructor of the new exception? Just raise SomeErrorType("error message"), and it will no
by marcosdumay 12y ago
If you don't want the older exception, why are you giving it to the constructor of the new exception?
Just raise SomeErrorType("error message"), and it will not polute your traceback. Raising SomeErrorType(anotherError) is there for when you care about anotherError.
- the_mitsuhiko 12y ago> If you don't want the older exception, why are you giving it to the constructor of the new exception? Exceptions are chained automatically through the stracktrace and not because they are passed to the constructor. By raising an exception from an exception handler you automatically chain them.