On 01/05/2020 07:48, Ram Rachum wrote:
There are 2 reasons I want this:
1. When I'm writing a try..except clause, I want to catch a specific
exception like MissingArgumentsError rather than ValueError or TypeError.
They're too ubiquitous. I don't want some other unexpected failure
producing the same ValueError and triggering my except clause.
If you want to catch MissingArgumentsError, you're doing something
really weird. I'm trying to think of a realistic example and failing.
2. When I get an error, especially from some shitty corporate system that
truncates the traceback, I want to get as many hints as possible about what
went wrong.
Then you should read the exception reason. You're still going to have
to think about what your program logic error is, and a separate
exception is going to be less use than an explanatory text string.
--
Rhodri James *-* Kynesim Ltd
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/4ZKBKMGTVUDL5G5B2ZOCEIYISOBSKAZF/
Code of Conduct: http://python.org/psf/codeofconduct/