Skip to content

Fix Result.trace: capture traceback at the exception site#361

Open
thatch wants to merge 1 commit into
facebook:mainfrom
thatch:result-trace-exc
Open

Fix Result.trace: capture traceback at the exception site#361
thatch wants to merge 1 commit into
facebook:mainfrom
thatch:result-trace-exc

Conversation

@thatch
Copy link
Copy Markdown
Contributor

@thatch thatch commented May 1, 2026

sys.exc_info() always returned (None, None, None) inside attrs_post_init because the except clause had already exited by the time Result was constructed. Move traceback capture to each except block in api.py using e.traceback, and remove the now-dead attrs_post_init from Result (along with the sys/traceback imports that were only needed for it).

sys.exc_info() always returned (None, None, None) inside
__attrs_post_init__ because the except clause had already exited by
the time Result was constructed.  Move traceback capture to each
except block in api.py using e.__traceback__, and remove the now-dead
__attrs_post_init__ from Result (along with the sys/traceback imports
that were only needed for it).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant