Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Weather App with Swift Managing Complexity Methods with Closures

Jens Hagfeldt
Jens Hagfeldt
16,548 Points

Why is error handling always left out?

Why do they always leave out the error handling? I think it feels bad not to be able to learn the correct way of using networking operations. Any tips on where you can get this part explained easily for iOS?

1 Answer

Martin Wildfeuer
PLUS
Martin Wildfeuer
Courses Plus Student 11,071 Points

You are right, error handling is an integral part which is, however, often left out for the sake of simplicity. It can be quite complicated with Swift, have a look at this article from Alexandros Salazar.

Error handling has changed a lot with the introduction of Swift 2, though. I would recommend reading the Swift 2 prerelease docs.

Jens Hagfeldt
Jens Hagfeldt
16,548 Points

Thanks Martin for your answer and the link to Alexandros blog post. I will look into that. I'm also excited about Apples release of Swift 2 where I saw in the videos that they now seems to have much more show and tell about error handling. I feel that the Treehouse courses are great and the teachers here explain so well, so it has been frustrating to not get the error handling part explained in equal extent as other topics. Also it is important (at least for me) that it relates to the courses where it should be implemented. As a separate course that part would not make as much sense. I have contacted Treehouse team and they answered that they will try to include it in the future. hopefully soon.

Yeah, I agree with Jens. Error handling is fundamental part of programming and is used or can be used in almost every function in many languages. I think it should be taught in the early courses and used as much as possible through out the latter lessons.