+ Reply to Thread
Results 1 to 1 of 1

Error handling with Call Stack and Execution Trace

  1. #1
    Registered User
    Join Date
    MS-Off Ver
    Excel 2010

    Error handling with Call Stack and Execution Trace

    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:

    Name:  ErrorMessage.jpg
Views: 16
Size:  40.5 KB

    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.:

    Name:  ExecTrace.jpg
Views: 16
Size:  213.5 KB

    When the error handling is incorporated a module/procedure will look as follows:
    Please Login or Register  to view this content.
    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.
    Attached Images Attached Images      
    Last edited by Warbe; 10-11-2019 at 07:00 AM. Reason: code reworked for minor improvements

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1