This is mistake:
if(some_error) throw Cat("Minoo");
Where Cat is a class.
Then in some other function that called the method that threw the exception ...
I'd:
catch(const Cat &c) { }
If this is not valid, I use the new Cat ("Minoo");
Could this cause a memory leak?
c ++ exception
Net citizen
source share