Today you’re going to learn about handling errors in functions. That might sound awfully pessimistic, but as John Lennon said “life is what happens when you’re busy making other plans” – no one wants problems, but life has a habit of finding them anyway!
Fortunately, Swift makes error handling straightforward and somewhat foolproof: it requires that we handle errors, or at least acknowledge that they might happen. If you don’t at least attempt to handle errors well, your code simply won’t compile.
Today you have two tutorials to work through, in which you’ll meet default values for parameters and throwing functions, and then we’ll summarize functions and look at checkpoint 4. Once you’ve completed each video, there is a short piece of optional extra reading if you’re looking to get some more details, and there’s also a short test to help make sure you’ve understood what was taught.
Need help? Tweet me @twostraws!
SPONSORED Stream’s latest iOS Chat SDK release provides a better developer experience with new docs, customizable attachments, and UI components, and under-the-hood performance improvements.
Link copied to your pasteboard.