⚠️ C++ Exception Handling

C++ lets you catch and handle runtime errors safely using try, throw, and catch blocks — so your app doesn't crash on bad input or logic errors.

📚 Example: try, throw, and catch

Console output will appear here...
💡 Pro Tip: You can throw custom types (like exceptions or structs) too, not just strings.

🔧 Syntax Breakdown

🎛️ Multiple Catch Blocks Example

📌 Example:
try {
    throw 404;
}
catch (int code) {
    cout << "Error code: " << code;
}
catch (...) {
    cout << "Unknown error";
}