title: rethrowing python exception. Which to catch?
body: <p>I'm learning to use python. I just came across this article:
  <a href="http://nedbatchelder.com/blog/200711/rethrowing_exceptions_in_python.html" rel="noreferrer">http://nedbatchelder.com/blog/200711/rethrowing_exceptions_in_python.html</a>
  It describes rethrowing exceptions in python, like this:</p>
  <pre><code>try:
      do_something_dangerous()
  except:
      do_something_to_apologize()
      raise
  </code></pre>
  <p>Since you re-throw the exception, there should be an &quot;outer catch-except&quot; statement. But now, I was thinking, what if the <code>do_something_to_apologize()</code> inside the except throws an error. Which one will be caught in the outer &quot;catch-except&quot;? The one you rethrow or the one thrown by <code>do_something_to_apologize()</code> ?
  Or will the exception with the highest priotiry be caught first?</p>