It shouldn't be necessary to wrap an entire script in a try/catch block just to report an exception. Are there particular exceptions that you expect this code to throw?