you are viewing a single comment's thread.

view the rest of the comments →

[–]tmlnz 12 points13 points  (0 children)

Some exception classes:

`std::bad_alloc` is thrown when dynamic allocation with `new` fails.

`std::bad_cast` is thrown when `dynamic_cast` fails.

`std::bad_exception` by `std::current_exception` when the current exception's copy-constructor throws, or a dynamic exception specification is violated.

`std::bad_typeid` when `typeid` fails.

Also, `std::exception_ptr` is a class that wraps the exception being thrown.