Geek Culture
Published in

Geek Culture

Swift: Error Handling Basics

Treat errors with care.

Photo by Romson Preechawit on Unsplash

In Swift, error handling means responding to error conditions in your program.

A function can either resolve errors by itself or throw an error back to the caller. In the latter case, the caller must take actions to handle the error properly.

Throwing Functions

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Artturi Jalli

Artturi Jalli

I built a blog from 0 to 350k+ monthly visits in 16 months without SEO.