I would like to write a function in which there are multiple “Exit Function” statements. Is there a way for me to make sure some clean up code is alway run before doing the exit function?
Here is what I’m actually trying to do, I want to set a standard in my test automation project, that certain function should run before the code of any function begins and run another function before exiting out of the function. Is there any simple way of doing this?
The wrapper class of Ekkehard.Horner is very usefull if you have stuff to do that can be out of scope of the function, like a stopwatch, a runstack viewer or an exception trapper on the err object. But when you have things to do inside the scope of the function and the wrapper class renders useless, you could consider using the
Do Loop While Falsepattern: