+ 4

Another exception raise after one exception caught. What should we do?

try: a = 10/0 print(a) except: print(2/0) # Here another exception will raise. """ what should I do here to caught second exception """

5th Mar 2017, 8:34 AM
Aqib Ansari
Aqib Ansari - avatar
5 odpowiedzi
0
finally
5th Mar 2017, 9:05 AM
Meharban Singh
Meharban Singh - avatar
0
exception raise in exception handler... finally is not working here
5th Mar 2017, 9:07 AM
Aqib Ansari
Aqib Ansari - avatar
0
finally is not working??? in that case except: try: _______ except: _______ please don't ask me if there is one more exception.... _/\_
5th Mar 2017, 10:33 AM
vishnu
vishnu - avatar
0
@vishnu try to run my code and see the result and add a handler after second exception caught...try it
5th Mar 2017, 11:26 AM
Aqib Ansari
Aqib Ansari - avatar
0
try: print(10/0) except: try: print(2/0) except: print('I said know, It works!!!') @aqib ansari
5th Mar 2017, 11:59 AM
vishnu
vishnu - avatar