Handling Exceptions

Learn how to handle exceptions in a code so the application is not terminated.

Understanding the problem

To understand how we can handle exceptions, we must first understand what the origins of a problem might be. It’s only when we have understood this that we can insert measures to handle them correctly.

Let’s return to our function that divides two values. Let’s say this function takes two arguments, as it did in our previous example:

Get hands-on with 1200+ tech skills courses.