0 votes
in C Plus Plus by

Comment on C++ standard exceptions?

1 Answer

0 votes
by

C++ supports some standard exceptions that can be caught if we put the code inside the try block. These exceptions are a part of the base class “std:: exception”. This class is defined in the C++ header file <exception>.

Few Examples of Exceptions supported by this class include:

bad_alloc – thrown by ‘new’

runtime_error – thrown for runtime errors

bad_typeid – thrown by type id

Introduction to Standard Template Library

Related questions

0 votes
asked Nov 21, 2023 in C Plus Plus by JackTerrance
0 votes
asked Dec 16, 2020 in JAVA by SakshiSharma
...