std::exceptionstd::bad_allocthrown by new on allocation failure.std::bad_castthrown by dynamic_cast when fails with a referenced type.std::bad_exceptionthrown when an exception type doesn't match any catch.std::bad_typeidthrown by typeid.std::logic_errorthrown by logic errors, represent problems in the internal logic of a program; in theory, these are preventable, and even detectable before the program runs.std::domain_errorthrown by the library, or by you, to report domain errors (domain in the mathmatical sense).std::invalid_argumentthrown to report invalid arguments to functions.std::length_errorthrown when an object is constructed that would exceed its maximum permitted size.std::out_of_rangethis represents an argument whose value is not within the expected range.
std::runtime_errorthrown by runtime errors, represent problems outside the scope of a program; they cannot be easily predicted and can generally only be caught as the program executes.std::overflow_errorthrown to indicate arithmetic overflow.std::range_errorthrown to indicate range errors in internal computation.std::underflow_errorthrown to indicate arithmetic underflow.
Created
July 29, 2010 11:55
-
-
Save dahnielson/497925 to your computer and use it in GitHub Desktop.
Standard exceptions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment