More typically you'd throw in the function and put the try/catch in the function that calls it. That way you'd know if it returned legitimately or threw the exception.
If you need the catch in foo, typically returning true would indicate foo succeeded, and false would indicated it didn't.Code:void bar() { try { if(foo()) ... } catch(...) { ... } }




Reply With Quote