Brought excluded code into the scope of a try block in SysLogHandler.emit().