Today, in my C++ multi-platform code, I have a try-catch around every function. In every catch block I add the current function\'s name to the exception and throw it again,
The answer to all your problems is a good debugger, usually http://www.gnu.org/software/gdb/ on linux or Visual Studio on Windows. They can give you stack traces on demand at any point in the program.
Your current method is a real performance and maintenance headache. Debuggers are invented to accomplish your goal, but without the overhead.