]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Log the content of ImmediateServFailException in getRootNS() 5372/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 2 Jun 2017 17:11:54 +0000 (19:11 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 2 Jun 2017 17:11:54 +0000 (19:11 +0200)
pdns/syncres.cc

index 5b077b6ad17bb07a1fbfadadb485fe7282db6155..195b98fcb1ded707fcbbaea61880a964a742b52a 100644 (file)
@@ -1800,24 +1800,24 @@ int SyncRes::getRootNS(struct timeval now, asyncresolve_t asyncCallback) {
     }
     return res;
   }
-  catch(PDNSException& e)
-  {
+  catch(const PDNSException& e) {
     L<<Logger::Error<<"Failed to update . records, got an exception: "<<e.reason<<endl;
   }
-
-  catch(std::exception& e)
-  {
+  catch(const ImmediateServFailException& e) {
+    L<<Logger::Error<<"Failed to update . records, got an exception: "<<e.reason<<endl;
+  }
+  catch(const std::exception& e) {
     L<<Logger::Error<<"Failed to update . records, got an exception: "<<e.what()<<endl;
   }
-
-  catch(...)
-  {
+  catch(...) {
     L<<Logger::Error<<"Failed to update . records, got an exception"<<endl;
   }
+
   if(!res) {
     L<<Logger::Notice<<"Refreshed . records"<<endl;
   }
   else
     L<<Logger::Error<<"Failed to update . records, RCODE="<<res<<endl;
+
   return res;
 }