tags:

views:

100

answers:

4

Possible Duplicate:
catch exception by pointer in C++

What is the best way to catch an exception: by value, reference or pointer and why?

+1  A: 

You nearly always want to catch exceptions by (usually const) reference.

Jerry Coffin
+1  A: 

By const reference. You can avoid object copying.

cx0der
A: 

You dont want to raise any more exceptions so catching by reference is best

Yogesh Arora
A: 

By reference, unless you're doing Windows programming, where exceptions are typically caught by pointer.

rlbond