title: How to print Exceptions of a nested loop?
body: <p>I want to print all the exception statements from within the inner try to the catch of the outside try. Is there any way to do this without changing the inner try-catch block</p>
  <pre><code>def test_nested_exceptions():
      try:
          try:
              raise AssertionError('inner error ')
          except AssertionError as ae:
  
              raise AssertionError(&quot;error in except&quot;)
          finally:
              raise AssertionError(&quot;error in finally&quot;)
      except AssertionError as e:
          print(e)
  </code></pre>