0

How i understand "raising errors"

suppose i want an user to input a name which consist of alphabets only. and the user enters numbers. here i can raise an error. thank u

15th Apr 2017, 7:07 PM
stephen haokip
stephen haokip - avatar
2 Answers
+ 7
Yes, you are correct. Errors can be raised to sent out an alert message when a certain condition arises in you code. It can b an error or even a normal event like u said name being only characters. Raising errors is simply a way to specify user defined errors.
15th Apr 2017, 7:16 PM
Shraddha
Shraddha - avatar
0
Shraddha , can you make me clear a little bit about why we must use raise exception , what is the purpose for that?
23rd Apr 2017, 6:02 AM
thĂ nh long nguyễn
thĂ nh long nguyễn - avatar