Chapter 44 Flashcards
What is stack unwinding
The flow control of throw is referred as stack unwinding. Stack unwinding is more complex than return value. Return can transfer the control to calling function whereas stack unwinding can transfer the control to multiple nested functions.
What happen in catch handler
The object thrown is copied to the object that is given in handler
What is shallow copy
It is default copy mechanism of C++. It copies member individually. It just copy the address of pointer.
What is deep copy
It is used for dynamic memory allocation.
How we can catch more than one object in a single catch
- Using inheritance
- Catch every exception
Can we group exceptions
Yes
What is re-throw
Re-throw is a mechanism that allow us to again through the exception after partial handling