Hi Amit,
Ole is right.
In my humble opinion, it's a weird project to close your program if the file is not found. Don't you want to keep working on indesign afterall ?
try/catch is a intersting technique to get info when you face a boring bug. But for that simple instruction,you can choose to do that :
var myfile = File("~/Desktop/minu/Amit-TOC.indd");
if(myfile.exists==true)
{
app.open(myfile);
}
/* you may not want to be warned for the non presence of the file
else
{
alert("Sorry, the file may have been displaced or removed !")
// Or better
// File.openDialog("Pick a file please...");
}
*/