<#227 Improve exception handling in custom excepth...
# flyte-github
a
#227 Improve exception handling in custom excepthook Pull request opened by pingsutw ## Summary • Improve traceback formatting by using
traceback.print_tb()
instead of manual string formatting • Add support for displaying exception causes when available (
exc_value.__cause__
) • Add comprehensive unit tests covering all functionality including edge cases ## Changes • src/flyte/_excepthook.py: Updated
custom_excepthook
function to use proper traceback formatting and handle exception causes • tests/flyte/test_excepthook.py: Added comprehensive test suite with 10 test cases covering all functionality ## Test plan • All existing tests pass • New unit tests cover both
should_include_frame
and
custom_excepthook
functions • Tests verify filtered traceback behavior • Tests verify exception cause handling • Tests verify DEBUG mode behavior flyteorg/flyte-sdk