Hi,
I'm trying to write two simple macros for begin and end of functions in order to manage and log all the Exceptions in my program. In other words, I wanna have a try-catch block in all of my functions.
in simple case consider the following macros.
#define __BEGIN_FUNCTION__ try {
#define __END_FUNCTION__ } catch(std::exception e) \
{ log << time << ':' << e << endl; }
but if I put these two macros in beginning and end of a function, the compiler will give the "Not all control paths return a value" error.
any solution?