Exceptions/Catch an exception thrown in a nested call: Difference between revisions

specify exactly how bar gets called twice (according to the Python example which was with the task creation)
(added Ursala)
(specify exactly how bar gets called twice (according to the Python example which was with the task creation))
Line 3:
 
# Create two user-defined exceptions, U0 and U1.
# Have function foo call function bar which then calls function baztwice.
# Have function bar call function baz.
# Arrange for function baz to raise, or throw exception U0 on its first call, then exception U1 on its second.
# Function foo should catch only exception U0, not U1.