What happens if an exception is throws from an, object's
constructor and object's destructor?
Answer Posted / akshay
constructor:
the destructors of all the member objects that were
correctly created are called, then code goes to the catch
statement if any
dtors:
legally allowed, however, it should be caught within the
function. if it is not caught, then it may lead to a call to
terminate() function. this call would happen in the case
when the destructor was itself called due to stack unwinding
happening because of another exception in probably some
other function.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What you know about structures in C++?
What is the fastest c++ compiler?
How static variables and local variablesare similar and dissimilar?
How do you remove an element from a set in c++?
What is vector processing?
What information can an exception contain?
What is static in c++?
the first character in the variable name must be an a) special symbol b) number c) alphabet
Why do we use setw in c++?
Why do we use vector in c++?
What is token c++?
What is a container class?
Which is the best c++ compiler?
What does it mean to declare a destructor as static?
What are guid?