+ 5

What is the use of manually raising exceptions?

18th Feb 2018, 4:20 PM
Vishnu ks
Vishnu ks - avatar
13 Respuestas
+ 3
Any examples?
18th Feb 2018, 6:32 PM
Vishnu ks
Vishnu ks - avatar
+ 3
Where have you specified that it fails only for the case you mentioned
18th Feb 2018, 8:47 PM
Vishnu ks
Vishnu ks - avatar
+ 2
this code isn't working
18th Feb 2018, 7:19 PM
Vishnu ks
Vishnu ks - avatar
+ 2
When I enter an integer, it doesn't show me an error.
18th Feb 2018, 8:33 PM
Vishnu ks
Vishnu ks - avatar
+ 2
And you have used .fail() in the if statement and you are telling that if it executes then the input is not a double but when it fails doesn't it mean that it failed to receive the input itself. So, how can you tell that it isn't a double.
18th Feb 2018, 8:36 PM
Vishnu ks
Vishnu ks - avatar
+ 2
Ok
18th Feb 2018, 8:50 PM
Vishnu ks
Vishnu ks - avatar
+ 2
Tq for the help
18th Feb 2018, 8:57 PM
Vishnu ks
Vishnu ks - avatar