Why are there three pieces of code that do this strange dance?
boost::shared_ptr<Exception> ex;
ex.reset( new Exception );
throw *ex.get();
Ignoring the fact that *ex.get()
is unnecessarily verbose (what's wrong with just *ex
?) why is the exception created on the heap, when it needs to be deleted again right away? Why not just throw an exception directly?
Pushed to master. Thanks for the patch