Introduction
CancellationException helps stop a running task cleanly when you want to cancel it.
You want to stop a background task when the user leaves a screen.
You want to cancel a long-running operation if it takes too long.
You want to clean up resources when a coroutine is cancelled.
You want to handle cancellation without treating it as an error.