To report failure of test case when window does not exist you can use following methods of of Verify class from Test Automation FX API:
with FailTest
method:
if (window["Exist"])
{
// Perform actions
}
else
{
Verify.FailTest("Window does not exist"); // Report failure message that will be shown in test report
}
with AreEqual
method:
Verify.AreEqual(window["Exist"], true); // will fail test if window dows not exist
// Perform actions