0

What is the point of exceptions?

What is it used for? Why would you type in error in your own code?

23rd Jun 2019, 2:18 PM
Mike Harris
Mike Harris - avatar
2 Answers
+ 1
It’s to handle errors. Most common example is if you try to open a file that does not exist. The computer will cause an error, but exceptions will take care of it, letting you exit the program “gracefully”.
23rd Jun 2019, 2:23 PM
Jackson O’Donnell
0
Thank you. They should have interpret this example in the lesson..
23rd Jun 2019, 2:24 PM
Mike Harris
Mike Harris - avatar