Possible Duplicate:
catch exception by pointer i开发者_运维技巧n C++
What is the best way to catch an exception: by value, reference or pointer and why?
You nearly always want to catch exceptions by (usually const) reference.
By const
reference. You can avoid object copying.
You dont want to raise any more exceptions so catching by reference is best
By reference, unless you're doing Windows programming, where exceptions are typically caught by pointer.
精彩评论