Your catch block is catching a CException*
type of exception, but you are throwing a bool
type of exception. If you want to catch that exception, you'll need a catch block that catches exceptions of type bool
:
catch(bool exception)
{
//report the exception, or recover, or whatever
}