Summary

In this chapter, we looked at Swift's error-handling features. This feature is really important for writing safe code. While we are not required to use this feature in our custom types, it does give us a uniform manner to handle and respond to error. Apple has also started to use this error handling in their frameworks. It is recommended that we use error handling in our code.

We also looked at the availability attribute, which allows us to develop applications that take advantage of the latest features of our target operating systems while still allowing our applications to run on older versions.

Get Mastering Swift 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.