Along with a try/catch block, you can use the ServiceBase.EventLog property to write the error(s) to the event log.