+ 1
Can you use the raise statement outside the except block?
[ YES ] | [ NO ]
4 Answers
+ 1
you have to write an exception after raise, for example:
raise ZeroDivisionError
you can also include some kinda message to show with that error:
raise IndexError('custom message here')
+ 1
of course, you can use it anywhere
+ 1
so, ... this code is True !?
# ~
try:
print( 32 / 0 )
except:
print("#Error")
raise
# ~
+ 1
thanks Bro.