I am looking at some articles about catch exception by reference.
I don't know what is the difference from this and my usual way as below.
Could you tell me??
Code:try { } catch( exception ex) { textbox1.text=ex.message; }
I am looking at some articles about catch exception by reference.
I don't know what is the difference from this and my usual way as below.
Could you tell me??
Code:try { } catch( exception ex) { textbox1.text=ex.message; }
In normal C++, catching by value involves slicing. Usually code throws exception that are derived from std::exception. If you catch by value, you lose the derived part of the exception object.
Your code however doesn't appear to be standard C++ but I guess the same reasoning may apply.
I might be wrong.
Quoted more than 1000 times (I hope).Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.