dry-python / dry-python/returns
Feature request: make the safe decorator add notes to any exceptions that get thrown for better logging
Open
enhancement
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 155
- Avg merge
- 2h 27m
- Merged PRs (30d)
- 22
Description
The results.safe decorator is a great tool to transform non railway oriented functions. One downside, however, is that the try-except block makes it harder to know where errors occurred, and therefore harder to debug. Using the add_notes method of Exceptions could fix this. Notes could be added to log what function the error occurred in, and possibly even line numbers.
Contributor guide
Assessment
This issue has not been assessed yet.