This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Question regarding raising Exception
When we try to raise exception using "raise TypeError("Only integers are allowed") "
Why the except block didn't run??
Did we already encounter the exception and we don't need except block we raise that in Try block???
1 answers ( 0 marked as helpful)
Thank you for reaching out!
The purpose of the
raise command is to raise an exception and then terminate the program immediately after. That is why we don't reach the
except statement in the code.