clsVersionControl: Error trapping setting. (We need this to "Break in Class Modules" for this add-in) #501
Replies: 2 comments 2 replies
-
Great question! I personally use it for many of the same reasons described here. Because class modules are extensively used in this project, it makes it easier to actually break on the code line that is triggering the error (which is often within a class module), rather than simply highlighting the calling code in the last standard module and requiring me to step through the code line by line to find the actual breaking point within the class. For your unit testing framework, you might consider setting the VBA option yourself before executing the test suite, just to ensure consistent behavior, regardless of which setting the user is currently using. You can see how I do this in the add-in here: |
Beta Was this translation helpful? Give feedback.
-
Hi! The behavior only occurs when I want to test the VCS add-in (clsVersionControlRunBeforeExportTests). |
Beta Was this translation helpful? Give feedback.
-
Hi!
Why is "Break in Class Modules" needed? That's the option I never need ;)
Background:
I wanted to run unit tests to test the RunBeforeExport option. Because of "Break in Class Modules" the code stops at the test assert and cannot be processed by the test framework.
I tried "Break On Unhandled Errors" (2) and did not notice any difference.
Am I missing something?
Kind regards,
Josef
Beta Was this translation helpful? Give feedback.
All reactions