Exception Handling with try

This lesson introduces the try control structure and teaches you how it can be used for exception handling.

We'll cover the following

Exception Handling

When running a program, we sometimes encounter unexpected conditions which give us errors and warnings. These conditions are known as exceptions. While exceptions are unexpected, they need to be anticipated by the programmer and only then can they be dealt with in a timely manner. The process of skillfully handling exceptions is known as exception handling.

Let’s take a real-life example to better visualize exception handling.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy