[openstack-dev] [Review] Use of exception for non-exceptional cases

Thomas Hervé therve at gmail.com
Thu Jul 11 09:43:04 UTC 2013


On Thu, Jul 11, 2013 at 1:49 AM, Monty Taylor <mordred at inaugust.com> wrote:

> I'd like top-post and hijack this thread for another exception related
> thing:
>
> a) Anyone writing code such as:
>
> try:
>   blah()
> except SomeException:
>   raise SomeOtherExceptionLeavingOutStackContextFromSomeException
>
> should be mocked ruthlessly.
>

i don't think mocking is a good way to convey your point. Losing tracebacks
is not great, but having an API raising random exceptions is probably
worse. Can you develop?

Regards,

-- 
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130711/cf5e6827/attachment.html>


More information about the OpenStack-dev mailing list