- way to handle errors gracefully
Try
- any code executed in a
try block and throws an error will not exit the running of the code
Catch
- the
catch block will get the error thrown from the try block and any code in the catch block will execute ONLY when an error is thrown
Finally
- the
finally block will always execute after the try and/or catch block code executes
Throw
- the
throw keyword is used to stop running the code by telling the environment that an error has occured
- Make sure you are prepared for the assessment by ensuring you can do all of the week’s learning objectives
- Questions or anything you want to go over answered here