Revision 3656
Added by Aaron Marcuse-Kubitza over 12 years ago
exc.py | ||
---|---|---|
32 | 32 |
# remove final "None" line ("exception name") |
33 | 33 |
|
34 | 34 |
def get_e_tracebacks_str(e): |
35 |
traceback_ = sys_traceback() # get first in case later code throws exception |
|
35 | 36 |
try: tracebacks = e.tracebacks |
36 |
except AttributeError: return ''
|
|
37 |
except AttributeError: tracebacks = [traceback_]
|
|
37 | 38 |
return ''.join(get_traceback_str(t) for t in tracebacks) |
38 | 39 |
|
39 | 40 |
def e_msg(e): |
Also available in: Unified diff
exc.py: get_e_tracebacks_str(): Use the current system traceback if the exception doesn't contain its own traceback(s)