std::exception can be derived from, but cannot be thrown directly. It is the base class for all of the C++ Standard Library exceptions. Here is the exception hierarchy:
exception
bad_alloc
bad_cast
bad_exception
bad_typeid
io_base::failure
logic_error
domain_error
invalid_argument
length_error
out_of_range
runtime_error
overflow_error
range_error
underflow_error
Reference: The C++ Standard Library

No comments:
Post a Comment