Error handling
Error handling is the way we manage the errors and exceptions in our application. This is very important in order to have all the possible errors that can happen in our development detected and organized.
What is error handling?
The term error handling is used in development to refer to the process of responding to the occurrence of an exception during the execution.
Usually, the appearance of exceptions breaks the normal workflow of an application execution and executes a registered exception handler, giving us more information about what is happening and, sometimes, how we can avoid the exception.
The way that PHP handles the errors is very basic. A default error message is composed of the filename, line, and a little description about the error that the browser receives. In this chapter, we will see three different ways to handle errors.
Why is error handling important?
The majority of applications are very complex and large, and they are also developed by different people or...