Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Musings: Using decorators to reduce duplicate exception handling
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Gabriel Genellina, post: 3797299"] I don't like the idea of "hiding" an exception. The caller code doesn't know an exception occurred, and just continue doing its work, with bogus results... is this what you want? Also, you don't include the stack trace - and usually it contains very valuable information. When your users start "filing a report with the TracShell developers" and you feel clueless, a stack trace is important (you don't have to show it on screen - a log file is even better). If all you want is to customize the error message, use sys.except_hook Looking into the code, those "pass" statement are useless; and error messages are usually written to stderr instead of stdout. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Musings: Using decorators to reduce duplicate exception handling
Top