Forum Discussion
rraghvani
Champion Level 3
4 years agoIf your project properties is configured to "Stop current item" on "On Error",
function testit()
{
try {
// Cause an exception to occur
throw new Error("An exception has occurred");
} catch (e) {
// Perform cleanup
Log.Message("Catch Perform Cleanup");
// Log error message
Log.Error(e.message);
Log.Message("This should not be called");
} finally {
// Perform cleanup
Log.Message("Finally Perform Cleanup");
}
Log.Message("This should not be called as well");
}
Then both messages e.g. "This should not be called..." will not be shown, as TestComplete will stop at Log.Error()