1. It is known FROM clause 12 that if a catch clause catches an exception that is passed by value, the thrown exception is copied two times, which reduces efficiency, and passing the derived class object to the base class object may have a cutting problem, but it is also advantageous to pass by value, when the catch clause re-throws the exception, It can choose whether to throw the exception handled by the catch clause or the original exception, which increases the flexibility (throw;)
2. Passing by the pointer seems to avoid the duplication of the exception (although the pointer is still copied, but the cost of 4 bytes is not high), but note that the pointer is not pointing to a local object, because the local object is destroyed, which requires the pointer to the dynamically allocated memory, but the resulting additional problem is the memory release problem, The user must always be aware of the memory release, which adds to the burden, and the programmer must also know that the pointer is pointing to a dynamically allocated memory.
3. Passing objects by reference requires only one copy at a time, while also avoiding the object's cutting problem when the catch clause is passed in, while also supporting polymorphism (Rtti when virtual function calls), but still cannot avoid cutting problems when re-throw (except using "throw;" Statement
4. Note: "More effective C + +" In this section advocates the use of pass-by-reference, but I think that by reference and by value each has its pros and cons (although the advantages of passing by reference is indeed more), but to pass the pointer or do not use as good.
More effective C + + clause 13 captures exception in reference mode