What should I to catch the Exception and then reload the security policyfile

Security.loadPolicyFile(“xmlsocket://”+SERVER_NAME+":5229"); when i use this to load security policyfile sometimes ,sometimes it fails , what should I to catch the Exception,and then reload the security policyfile. because there are many clients and the client networking is bad . thanks

it would throw Failed to load policy file from xmlsocket exception ! what should i do to catch it?