C++ errors and exceptions
Handle invalid entries, missing records, and interrupted work. Follow each failure from the input that triggers it to a response the user can act on.
Input and validation
- std::bad_variant_accessCheck the type of an imported fare
- std::from_chars and std::errcReject a mistyped order quantity
- std::optional::value_orPrint a label when the phone number is missing
- std::regex_errorValidate a saved product search
State and collections
- Checked integer divisionSplit an equipment fee across a class
- std::out_of_rangeFind a seat after the coach changes
Files and streams
- istream::read and gcountRead a stock count from a short record
- std::filesystem::existsOpen the first receipt of the day