Swift Error Handling - Do, Try, Catch - iOS Interview Question Series

preview_player
Показать описание
The next topic in my series on iOS Interview questions explains error handling and the do, try, catch syntax in iOS and Swift. This iOS interview question was asked in a few interviews, so it's a good topic to learn. In this tutorial I walk though some basic error handling on a log in screen using the Do, Try, Catch syntax in Swift.

This is part of a series of videos about iOS interview questions in Swift. Check out the overview where I list and briefly discuss all the topics that are in this series:

Source Code:

iOS Dev Courses:

Twitter:

Book and learning recommendations that help out the channel if you decide to purchase (Affiliate Links):

Paul Hudson's Hacking With Swift:

Donny Wals - Combine:

Mark Moeyken’s SwiftUI Books:

Ray Wenderlich Books:

#swift #softwaredeveloper #iosdeveloper
Рекомендации по теме
Комментарии
Автор

Thank you, even after 6 years, your code and teaching is still actual

renagurbanovasenglish
Автор

Awesome video! I like how you reinforced the "throw" keyword in there. 😃 The repetition makes it stick! Thanks, Sean.

bigmtnstudio
Автор

If I have to learn any difficult concept, I look up your videos. You explain it better than anybody else.

slasht
Автор

Dude every question I have about iOs, you have a video on it... thx A LOT!!! Happy new years!

javierv.
Автор

I love this series for it's organization and simplicity. There are far too many hour long tutorials on these fundamental concepts. You explain it well and show people it's not as hard as many people make it out to be. Subscribed. Cheers

tactteam
Автор

Hey Mr. Allen, firstly, thank you for everything. I don't know how I discovered you has a wonderful, simple and understandable explanation. I'm a CS student in Ankara Bilkent University. I really wanted to learn swift but it was very complex until I find you. I cannot explain how happy I am, please continue to create these great videos, series and keep it complete and simple. Thank you again. (sorry for the grammar mistakes)

fikretsengul
Автор

Have a question about the Do, Try, Catch syntax? Leave a question below!

seanallen
Автор

Thanks for putting this example into context. Please continue to do your videos so that it's easier to understand where to use these programming concepts.

soyhenryxyz
Автор

Nice explanation Sean! I’m really enjoying your videos! I know it’s crystal clear to everybody, but please note that the magically code that actually logs you in will be performed asynchronously in the background (obviously). So make sure to handle the successful login request properly, and put your transition code there, instead of simply putting them the next line right after try login(). Otherwise the control will be given back to your do block, where the remaining code will be executed before the login response arrives.

choofie
Автор

Thanks for continuing your interview series.

isaacclark
Автор

This was by far one of the best and most practical explanations of Do/Try/Catch I have seen!

chrisstromberg
Автор

my favorite series ... thanks a lot ...

NLBAMF
Автор

Another great video from this series! Detailed and yet easy to understand. Thanks.

johntamch
Автор

Thank you for the rapid explanation, Do, Try and Catch were confusing me.

I am surprised to see no less than three Bang Operators !

tonyferber
Автор

Well I'm a beginner developer and I really needed to see some videos about iOS development and etc. I found your channel and enjoying so far. Thanks man :)

egesucu
Автор

Best tutorial ever for swift error handling, really thank you.

ahmedMahmoud-zskn
Автор

Love your videos man! You are putting out some great content. Thanks for your time and effort.

Reel_Sober
Автор

Your videos are just what i needed all the time
thank you

Sasan_Soroush
Автор

Crystal clear of do try catch! Thank you!

martinsin
Автор

Thanks Sean,
This video is very helpful,
Can you please make sure that if their is any way to write all error cases in another swift file ?
If it is possible, please give an example as I am new in swift so I am facing some problem to write this code.

sudebsarkar