11 lines
208 B
Python
11 lines
208 B
Python
import traceback
|
|
|
|
|
|
def get_stacktrace(error):
|
|
msg = repr(error)
|
|
try:
|
|
tb = traceback.format_exception(error)
|
|
return (msg + "".join(tb)).strip()
|
|
except Exception:
|
|
return msg
|