Throw, Try, Try? Try! Catch

  Рет қаралды 3,934

Stewart Lynch

Stewart Lynch

4 жыл бұрын

Many developers, including myself are confused by the different flavors of the `try` keyword. Swift defines three variations of the `try` keyword.`try`, `try?`, `try!`
You use the try key word when you have a function that throws. What the heck does that mean?
If you are like me, and confused as to what throw means and which flavour of try to use and why, then keep watching this video. Hopefully, I will be able so shed some light.
Starter Projects:
www.createchsol.com/StarterPr...
References:
9 part series on JSON Parsing and Codable Protocol.
• JSON and Codable Proto...
Stewart Lynch's KZfaq Channel
/ stewart Lynch
CreaTECH Solutions Website
www.createchsol.com
Stewart Lynch's GitHub
github.com/StewartLynch

Пікірлер: 32
@shynepo6
@shynepo6 2 жыл бұрын
I followed your 9 part JSON series before coming here to find clarity on everything "throw, do, try, catch" related. I love how you took the time to relate these concepts to your JSON series. You have an extremely thoughtful and Pattern-Recognition-Friendly method of delivering information and interconnecting it to slowly reveal a larger framework. Thank you.
@carlosswiftdev2703
@carlosswiftdev2703 2 жыл бұрын
I always wondered why tutorials said try needed to be wrapped in a do catch and this always puzzled me and now I understand the errors are bubbled up to the top. Awesome! thank you very much
@brandonwinston
@brandonwinston 4 жыл бұрын
omfg this was easily easily the best explanation of this subject. I still don't really understand why a plain "try" is customary at init, but I will check out your decoding series for more info on that.
@srome0711
@srome0711 Жыл бұрын
Very helpful - especially the JSONdecoder info
@andrejkling3886
@andrejkling3886 3 жыл бұрын
Gratitude for Amazing content in all lessons on the Channel
@saifcodes
@saifcodes 4 жыл бұрын
Great explanation with good examples. Keep it coming. Thanks for the amazing content.
@yogeshsharma8628
@yogeshsharma8628 4 жыл бұрын
Simple way to explain things and with best examples . Thanks and keep making more videos.
@arsgardisnotaplace
@arsgardisnotaplace 2 жыл бұрын
Thank you for the explanation. Simple yet precise 👍👍
@KarthickKarthick-zt7vh
@KarthickKarthick-zt7vh
Very useful. Thanks for making this video.
@tibettenballs4962
@tibettenballs4962 2 жыл бұрын
you are a very, very good tutor.
@Mhak-rt3lu
@Mhak-rt3lu 14 сағат бұрын
Thank you very much.
@josuecruz0921
@josuecruz0921 2 жыл бұрын
Thanks for your amazing tutorials 🙏🏽
@ZigBehaviour
@ZigBehaviour 3 жыл бұрын
excellent attention to detail in both content and presentation style.
@nicholasdimaria
@nicholasdimaria 3 жыл бұрын
Excellent video! This was extremely helpful for me. I like your educational presentation style
@vincentjoyhere
@vincentjoyhere 3 жыл бұрын
Excellent explanation! Thanks for doing this :)
@nenadnikolic3367
@nenadnikolic3367 3 жыл бұрын
Wonderfull explanation! Great work!
@dr.craigcurphey4829
@dr.craigcurphey4829 4 жыл бұрын
This cleared up my understanding of this whole concept. Excellent job!
@tibettenballs4962
@tibettenballs4962 2 жыл бұрын
DOOD! make UDEMY kourses
Dealing with Optionals in Swift
31:15
Stewart Lynch
Рет қаралды 1,8 М.
contains, forEach, sorted
18:06
Stewart Lynch
Рет қаралды 2,1 М.
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 15 МЛН
哈莉奎因以为小丑不爱她了#joker #cosplay #Harriet Quinn
00:22
佐助与鸣人
Рет қаралды 8 МЛН
try, catch, finally, throw - error handling in JavaScript
5:46
freeCodeCamp.org
Рет қаралды 170 М.
Why I *highly dislike* iOS Development
10:38
mayuko
Рет қаралды 346 М.
Enum Associated Values + Swift Result Type
21:09
Stewart Lynch
Рет қаралды 4 М.
Concurrency and Grand Central Dispatch in iOS
12:03
Clarissa Calderon - Swift Bits
Рет қаралды 1,6 М.
How to use Do, Try, Catch, and Throws in Swift | Swift Concurrency #1
26:34
How to handle errors in functions - Swift for Complete Beginners
11:16
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 64 М.
What is JSON - JSON Parsing in Swift
24:15
CodeWithChris
Рет қаралды 73 М.
Error Handling | Learn to Code In Swift
23:07
Matt Heaney Apps
Рет қаралды 1,1 М.
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 15 МЛН