Files
zenml/venv/lib/python3.9/site-packages/mlflow/utils/exception_utils.py
Christian Mantha 2ca0b9ef7c star
2026-03-02 19:10:52 -05:00

15 lines
365 B
Python

import sys
import traceback
def get_stacktrace(error):
msg = repr(error)
try:
if sys.version_info < (3, 10):
tb = traceback.format_exception(error.__class__, error, error.__traceback__)
else:
tb = traceback.format_exception(error)
return (msg + "".join(tb)).strip()
except Exception:
return msg