catch uncaught exception for httpserver