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 an Interactive Story App with Swift 2 Refactoring the Model Layer Handling Incorrect Input

Drew Carver
Drew Carver
5,189 Points

Because Swift does not throw typed errors we also need a generic catch block?

Toward the beginning of the video (at 0:17), when he adds Error.NoName to the first catch statement, he says "because Swift does not throw typed errors we also need a generic catch block." What does this mean? Aren't we using typed errors? (i.e. we set up an enum type Error that conforms to a protocol ErrorType)

faraz
faraz
Courses Plus Student 21,474 Points

I was wondering the same thing, coming from a Java background, generic catch blocks in Java are always a bad idea...