]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Log the content of webserver's exceptions 3836/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 9 May 2016 15:35:17 +0000 (17:35 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 9 May 2016 15:35:17 +0000 (17:35 +0200)
pdns/dnsdist-web.cc

index 52f1719616bc94008b0a2e7994d69f06aab3d9ee..0699f14b07432748722ed4cb8a420bd9d3c07ffe 100644 (file)
@@ -400,12 +400,16 @@ static void connectionThread(int sock, ComboAddress remote, string password, str
     fclose(fp);
     fp=0;
   }
-  catch(...)
-    {
-      errlog("Webserver thread died with exception");
-      if(fp)
-       fclose(fp);
-    }
+  catch(const std::exception& e) {
+    errlog("Webserver thread died with exception: %s", e.what());
+    if(fp)
+      fclose(fp);
+  }
+  catch(...) {
+    errlog("Webserver thread died with exception");
+    if(fp)
+      fclose(fp);
+  }
 }
 void dnsdistWebserverThread(int sock, const ComboAddress& local, const std::string& password, const std::string& apiKey, const boost::optional<std::map<std::string, std::string> >& customHeaders)
 {