Make re-raising of client exceptions safer
Make re-raising of client exceptions safer

Given that we are passing the exception value as a parameter to
ignore_not_found() and its ilk, it is very unexpected that they ignore this
parameter and instead raise whatever the last exception was. Guard against
this by checking that we really are re-raising the same exception, and fall
back to re-raising the correct exception with a new stack trace if not.

Change-Id: I18a86569a9ba4ee81d943d496349a585dad74ef6
Related-Bug: #1495714

openstack/heat,dragorosson/heat,noironetworks/heat,pratikmallya/heat,steveb/heat,gonzolino/heat,gonzolino/heat,openstack/heat,maestro-hybrid-cloud/heat,cwolferh/heat-scratch,jasondunsmore/heat,dragorosson/heat,dims/heat,noironetworks/heat,maestro-hybrid-cloud/heat,jasondunsmore/heat,pratikmallya/heat,steveb/heat,cwolferh/heat-scratch,dims/heat