Move try/catch block to log un-handled exception.