Two suggestions:
1) Build into your tests some sort of identifying or classification factor that is "standardized" and is stored in some sort of global location (like Project.Variables). Then, in your OnLogError event handler, check that global location and perform a script based upon what is found there. This could be the type of error encountered (easy to do with try/catch/finally code in JScript and DelphiScript), or the type of test being performed, or some other thing. Takes some code work, but it can be done.
2) Determine a universal starting point for all tests. Then, when an error occurs, clear out the system and set it up again back to the universal starting point so that your next test will be able to execute accordingly.