It was too enticing. Once I've managed my new error handling including a call stack (for displaying the path from the error raising procedure back up to the entry procdure) I had a begin-of-procedure (push) and an end-of-procedure (pop) call in each procedure. Why not extending the call stack with a begin-of-trace along with each push and an end-of-trace with each pop by incorporating my PrecisionTimeTaking module? Now the error handling provides both: An error message at the entry procedure level, for example:
And with the command mErrHndlr.DsplyTrace (when the conditional compile argument is ExecTrace=1) in the Immediate Window a complete execution trace (example of the trace of a test procedure demonstrating the included error messages raised for test purpose.:
When the error handling is incorporated a module/procedure will look as follows:
I always find the comfort for debugging is worth the little extra effort. Those who agree will find the complete solution in the Workbook ErrHndlr.xlsm for download.
Copy from it the Standard Module mErrHndlr and the Class Modules clsCallStack and clsCallStackItem into your project and start using it.
Looking forward for comments, questions, etc.
Bookmarks