Introduction
Sometimes one error causes another error. Testing exception chains helps check that the right errors happen in the right order.
When a function catches one error and raises a new error based on it.
When you want to make sure the original error is not lost after a new error is raised.
When debugging complex code that handles multiple errors.
When you want to confirm the full error history is available for logging or user messages.