I am using aI'm writing code which havethat has to deal with a lot of IndexError exceptionexceptions.
So, I took the idea of putting exception handler in the following wayused a try except block:
try:
<do some level_1 calculations>
except IndexError:
<change to level_2 calculations>
But, what if my exception-handler again raises another IndexError ?
How can I be able tosafely put another IndexError exception with this code-structure ?
So structure so that, if the level_2 calculation again gotgets caught in an IndexError, then the code runs "level_3 calculations" as anan exception again and so on.