Chapter 44 Flashcards

1
Q

What is stack unwinding

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What happen in catch handler

A

The object thrown is copied to the object that is given in handler

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is shallow copy

A

It is default copy mechanism of C++. It copies member individually. It just copy the address of pointer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is deep copy

A

It is used for dynamic memory allocation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How we can catch more than one object in a single catch

A
  • Using inheritance

- Catch every exception

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Can we group exceptions

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is re-throw

A

Re-throw is a mechanism that allow us to again through the exception after partial handling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly