Handling the Exceptions

Understand how to handle exceptions with coroutines.

We'll cover the following

If a caller sends a wrong value, the coroutine will terminate, raising an error. Does this ring a bell? Recall that when writing the maximum coroutine, we asked you to assume that all values would be integers. Now, at this point in the course, we are ready to get hands-on experience in dealing with such cases like sending a value of the wrong type.

Discovering the problem

Before we learn how to handle the exceptions, let’s have a swift overview of the problem.

Get hands-on with 1200+ tech skills courses.