All Standard Exceptions
All Standard Exceptions
A compact scan page for the main standard C++ exception types, error-code types, and adjacent failure-reporting facilities.
All Standard Exceptions
A compact scan page for the main standard C++ exception types, error-code types, and adjacent failure-reporting facilities.
Use reference pages to confirm names, categories, nearby facilities, and the constraints that matter before writing or reviewing code.
Use this page as a fast scan. For grouped explanations, see Standard exceptions and errors.
std::exceptionstd::bad_exceptionstd::nested_exceptionstd::logic_errorstd::invalid_argumentstd::domain_errorstd::length_errorstd::out_of_rangestd::runtime_errorstd::range_errorstd::overflow_errorstd::underflow_errorstd::bad_allocstd::bad_array_new_lengthstd::bad_caststd::bad_typeidstd::bad_function_callstd::bad_optional_accessstd::bad_variant_accessstd::bad_any_caststd::bad_expected_access<E>std::ios_base::failurestd::filesystem::filesystem_errorstd::system_errorstd::error_codestd::error_conditionstd::error_categorystd::errcstd::exception_ptrstd::current_exceptionstd::rethrow_exceptionstd::make_exception_ptrerrnoperrorstrerrorstd::error_code when callers are expected to branch locally without throwing.std::expected<T, E> when failure is part of the ordinary API contract.int main() {
// Pick one facility from this reference page.
// Write the smallest program that exercises its main precondition,
// complexity rule, or lifetime constraint before scaling up.
return 0;
}