Raise without if condition | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 3

Raise without if condition

How does it make sense to Raise an exception outside a condition check using If.

27th Jan 2018, 2:57 PM
AJESH KUMAR
AJESH KUMAR - avatar
1 Resposta
+ 3
you can make a method which constructs an exception from some string describing it, when you want to add some information to every exception's description (like values of variables)
27th Jan 2018, 3:40 PM
michal