Purpose: C++ uses exceptions to handle error conditions.
This mechanism allows developers to separate error-handling logic from regular code flow, improving clarity and robustness.