| High Integrity CPP Rule 9.3 | Catch exceptions by reference. |
| (QA C++ 4031) |
| Justification |
Using pass-by-pointer for exceptions requires extra calls for memory allocation and deletion which may themselves cause further exceptions or memory loss if the exception object is not deleted. If an exception object is caught by value, information in a derived class may be sliced from the exception in this exception handler. |
| See also |
Rule 11.4 |
| Reference |
More Effective C++ Item 13;Industrial Strength C++ 12.13; |