Before you modify the recovery system, you need to understand the flow of control during the execution of each of your test cases. The recovery system executes the DefaultTestcaseEnter function. This function, in turn, calls the SetAppState function, which does the following:
DefaultTestCaseEnter() is considered part of the test case, but DefaultTestCaseExit() is not. Instead, DefaultTestCaseExit() is considered part of the function that runs the test case, which implicitly is main() if the test case is run standalone. Therefore an unhandled exception that occurs during DefaultTestCaseEnter() will abort the current test case, but the next test case will run. However, if the exception occurs during DefaultTestCaseExit(), then it is occurring in the function that is calling the test case, and the function itself will abort. Since an application state may be called from both TestCaseEnter() and TestCaseExit(), an unhandled exception within the application state may cause different behavior depending on whether the exception occurs upon entering or exiting the test case.