|
We have ice_throw() in order to be able to store exceptions, and throw them later.
For example, sometimes you want to have a thread that sends requests in the background (a "call queue"). Any exceptions from sending such requests are stored and thrown when the main thread tries to add another request to the call queue.
The code you are referring to is this:
NotRegisteredException ex(__FILE__, __LINE__);
ex.kindOfObject = "user exception factory";
ex.id = id;
throw ex;
I don't see anything wrong with this code. An explicit copy constructor for NotRegisteredException is not necessary, because the constructor that the C++ compiler must create by default is perfectly ok for this.
|