Is it a bug to do this:
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 would have:
catch(const Cat &c)
{
}
If it is invalid, do I use new Cat("Minoo");
Would that cause a memory leak?