0Pricing
Swift Academy · Lesson

Error Handling

Error Handling

Introduction

Hello,

While the application is running, some errors may occur depending on the code of our application (logic errors, etc.) or depending on the environment in which the application is running.

Error handling can be used during the identification and control of errors that occur.

error types

After an error occurs, error handling can prevent the flow of the application from disrupting, log errors or, in some cases, close the application (in cases where it is impossible to run).

Some of the errors that can occur can be caused by logic errors in the code of the software developers. For example, the application will throw an error when we force unwrap an optional value that we learned in the previous section.

In some cases, errors may occur independent of the developer. For example, if there is no disk space on the device where the application is running, an error will occur in our application again.

← Back to Swift Academy