#####  [ cppreference.com ](/)

[ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Ferror "You
are encouraged to log in; however, it is not mandatory \[o\]")

#####  Namespaces

  * [ Page ](/w/cpp/error "View the content page \[c\]")
  * [ Discussion ](/w/Talk:cpp/error "Discussion about the content page \[t\]")

#####  Variants

#####  Views

  * [ View ](/w/cpp/error)
  * [ Edit ](/mwiki/index.php?title=cpp/error&action=edit "You can edit this page. Please use the preview button before saving \[e\]")
  * [ History ](/mwiki/index.php?title=cpp/error&action=history "Past revisions of this page \[h\]")

#####  Actions

#  Error handling

From cppreference.com

< [ cpp ](/w/cpp "cpp")

[ C++ ](/w/cpp "cpp")

[ Compiler support ](/w/cpp/compiler_support "cpp/compiler support")  
---  
[ Freestanding and hosted ](/w/cpp/freestanding "cpp/freestanding")  
[ Language ](/w/cpp/language "cpp/language")  
[ Standard library ](/w/cpp/standard_library "cpp/standard library")  
[ Standard library headers ](/w/cpp/header "cpp/header")  
[ Named requirements ](/w/cpp/named_req "cpp/named req")  
[ Feature test macros ](/w/cpp/feature_test "cpp/feature test") (C++20)  
[ Language support library ](/w/cpp/utility#Language_support "cpp/utility")  
[ Concepts library ](/w/cpp/concepts "cpp/concepts") (C++20)  
[ Metaprogramming library ](/w/cpp/meta "cpp/meta") (C++11)  
**Diagnostics library**  
[ General utilities library ](/w/cpp/utility "cpp/utility")  
[ Strings library ](/w/cpp/string "cpp/string")  
[ Containers library ](/w/cpp/container "cpp/container")  
[ Iterators library ](/w/cpp/iterator "cpp/iterator")  
[ Ranges library ](/w/cpp/ranges "cpp/ranges") (C++20)  
[ Algorithms library ](/w/cpp/algorithm "cpp/algorithm")  
[ Numerics library ](/w/cpp/numeric "cpp/numeric")  
[ Localizations library ](/w/cpp/locale "cpp/locale")  
[ Input/output library ](/w/cpp/io "cpp/io")  
[ Filesystem library ](/w/cpp/filesystem "cpp/filesystem") (C++17)  
[ Regular expressions library ](/w/cpp/regex "cpp/regex") (C++11)  
[ Concurrency support library ](/w/cpp/thread "cpp/thread") (C++11)  
[ Technical specifications ](/w/cpp/experimental "cpp/experimental")  
[ Symbols index ](/w/cpp/symbol_index "cpp/symbol index")  
[ External libraries ](/w/cpp/links/libs "cpp/links/libs")  
  
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/navbar_content&action=edit)

**Diagnostics library**

|  Exception handling  
---  
[ exception  ](/w/cpp/error/exception "cpp/error/exception")  
[ uncaught_exception  uncaught_exceptions  ](/w/cpp/error/uncaught_exception
"cpp/error/uncaught exception") (  until C++20*  )  (C++17)  
[ exception_ptr  ](/w/cpp/error/exception_ptr "cpp/error/exception ptr")
(C++11)  
[ make_exception_ptr  ](/w/cpp/error/make_exception_ptr "cpp/error/make
exception ptr") (C++11)  
[ current_exception  ](/w/cpp/error/current_exception "cpp/error/current
exception") (C++11)  
[ rethrow_exception  ](/w/cpp/error/rethrow_exception "cpp/error/rethrow
exception") (C++11)  
[ nested_exception  ](/w/cpp/error/nested_exception "cpp/error/nested
exception") (C++11)  
[ throw_with_nested  ](/w/cpp/error/throw_with_nested "cpp/error/throw with
nested") (C++11)  
[ rethrow_if_nested  ](/w/cpp/error/rethrow_if_nested "cpp/error/rethrow if
nested") (C++11)  
Exception handling failures  
[ terminate  ](/w/cpp/error/terminate "cpp/error/terminate")  
[ terminate_handler  ](/w/cpp/error/terminate_handler "cpp/error/terminate
handler")  
[ get_terminate  ](/w/cpp/error/get_terminate "cpp/error/get terminate")
(C++11)  
[ set_terminate  ](/w/cpp/error/set_terminate "cpp/error/set terminate")  
[ bad_exception  ](/w/cpp/error/bad_exception "cpp/error/bad exception")  
[ unexpected  ](/w/cpp/error/unexpected "cpp/error/unexpected") (  until
C++17*  )  
[ unexpected_handler  ](/w/cpp/error/unexpected_handler "cpp/error/unexpected
handler") (  until C++17*  )  
[ get_unexpected  ](/w/cpp/error/get_unexpected "cpp/error/ge