Throw | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Throw

What does the throw keyword do?? I just want a simple answer. Cause I can't understand a shit about the tutorials :D

1st Oct 2016, 3:43 PM
MM1132
MM1132 - avatar
5 Answers
+ 1
it wont pause it. the program will exit.
1st Oct 2016, 4:03 PM
Mythos
+ 1
throw is throwing & then exeption exit programm or catching
1st Oct 2016, 4:28 PM
shilko2013
0
it will simply raise an error and halt execution of the program. Edit: Exception will be thrown which will cause the program to halt.
1st Oct 2016, 3:57 PM
Mythos
0
So it will tell the program that there is an error and pause the program??
1st Oct 2016, 4:00 PM
MM1132
MM1132 - avatar
0
Thank you so <censored> much :D
1st Oct 2016, 4:14 PM
MM1132
MM1132 - avatar