Forum Discussion
rraghvani
3 years agoChampion Level 3
If 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()
Related Content
- 5 years ago
- 14 years ago
- 7 years ago
- 13 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago