is it at all possible to do something like:
or do the try/catch blocks have to be hard coded into the blocks where the exception might occur?Code:template <typename returnType,typename argType>tryFunc(typename (*func)(argType),argType arg)
{
try
{
func(arg);
}
catch(...)
{
//handle exception
}
}
it would be extremely useful to me if there was a way to get out of having to write try/catch blocks around every piece of code i ever write...