[Yahoo-eng-team] [Bug 1281453] Re: Replace exception "re-raises" with excutils.save_and_reraise_exception()
This has been covered by other work in Neutron. ** Changed in: neutron Status: New => Invalid -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1281453 Title: Replace exception "re-raises" with excutils.save_and_reraise_exception() Status in OpenStack Image Registry and Delivery Service (Glance): New Status in OpenStack Neutron (virtual network service): Invalid Bug description: There are quite a few places in the Glance code where exceptions are re-raised: try: some_operation() except FooException as e: do_something1() raise except BarException as e: do_something2() raise These places should use the excutils.save_and_reraise_exception class because in some cases the exception context can be cleared, resulting in None being attempted to be re-raised after an exception handler is run (see excutils.save_and_reraise_exception for more). try: some_operation() except FooException as e: with excutils.save_and_reraise_exception() as ctxt: do_something1() except BarException as e: with excutils.save_and_reraise_exception() as ctxt: do_something2() To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1281453/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1281453] Re: Replace exception "re-raises" with excutils.save_and_reraise_exception()
** Also affects: neutron Importance: Undecided Status: New ** Changed in: neutron Assignee: (unassigned) => Lee Li (lilinguo) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1281453 Title: Replace exception "re-raises" with excutils.save_and_reraise_exception() Status in OpenStack Image Registry and Delivery Service (Glance): New Status in OpenStack Neutron (virtual network service): New Bug description: There are quite a few places in the Glance code where exceptions are re-raised: try: some_operation() except FooException as e: do_something1() raise except BarException as e: do_something2() raise These places should use the excutils.save_and_reraise_exception class because in some cases the exception context can be cleared, resulting in None being attempted to be re-raised after an exception handler is run (see excutils.save_and_reraise_exception for more). try: some_operation() except FooException as e: with excutils.save_and_reraise_exception() as ctxt: do_something1() except BarException as e: with excutils.save_and_reraise_exception() as ctxt: do_something2() To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1281453/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp