0

Can you use the raise statement outside the except block?

try: num = 5 / 0 except: print("An error occurred") raise ------------------------------------------------------------------ ----------------------------------------------------------------- An error occurred Traceback (most recent call last): File "..\Playground\", line 5, in <module> raise RuntimeError: No active exception to reraise

18th Jul 2019, 5:22 AM
Harsha vardhan
Harsha vardhan - avatar
2 ответов