dry-python / dry-python/returns

Feature request: make the safe decorator add notes to any exceptions that get thrown for better logging

Open
#2,107 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.