Yes, your try...catch block cannot be a stand alone stuff... It should be within a function...