Format code and add some error handling
Format code and add some error handling

GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver,GerHobbelt/civet-webserver