returns icon indicating copy to clipboard operation
returns copied to clipboard

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

Open madkopp opened this issue 11 months ago • 2 comments

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.

madkopp avatar Apr 11 '25 04:04 madkopp

PR is welcome :)

sobolevn avatar Apr 11 '25 07:04 sobolevn

Done. I tried to follow your styling as much as possible, but please let me know if you would like me to edit anything. Also, see the notes in the pull request for some items I wasn't sure about.

madkopp avatar Apr 11 '25 12:04 madkopp