3 ms·
Given enough digging around in the python runtime system I'm sure you can find the current stack trace and shove that in an error class. But now it's a lesser
by bb88 4y ago
Given enough digging around in the python runtime system I'm sure you can find the current stack trace and shove that in an error class.
But now it's a lesser error than an exception. Any exception while processing your error will cause the stack to unwind and drop the error variable with the stack trace inside of it.
Now if you raise an exception while in the handling of an exception, python will keep around both stack traces.