Why catch an exception as reference-to-const?

后端 未结 5 1989
醉梦人生
醉梦人生 2020-11-27 15:07

I\'ve heard and read many times that it is better to catch an exception as reference-to-const rather than as reference. Why is:

try {
    // stuff
} catch (c         


        
5条回答
提交回复
热议问题