exdunepilot
6 years agoContributor
Python Error Handling Not Executing Finally Block - TestComplete 14.0
Try/Except works, but an exception is thrown in the except block (seems to refer to this syntax: str(err)) and never makes it to the finally block. TestComplete 12.6 did not have this issue.
Something else to check:
In the TestItems page, right click and select "Field Chooser". There should be a field of "on exception". Add that to your test item list. I BELIEVE this defaults to "Stop test item" on exception. So, you're throwing an "exception" in your code. This would then prompt the automation to halt on that exception which is why it doesn't get to the "finally" clause. You can set that to "continue running" as well. See if that corrects your problem.