]> granicus.if.org Git - pdns/commitdiff
make sure pdnssec emits error messages about inability to load a backend, and not...
authorbert hubert <bert.hubert@netherlabs.nl>
Thu, 22 Jan 2015 10:25:44 +0000 (11:25 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Thu, 22 Jan 2015 10:25:44 +0000 (11:25 +0100)
pdns/pdnssec.cc

index a87ac1d9702a9eeabe7c94b185790e5014a800f7..221eeef46b3842347442307769112a7fc22cbe0f 100644 (file)
@@ -143,9 +143,9 @@ void loadMainConfig(const std::string& configdir)
   ::arg().set("max-signature-cache-entries", "Maximum number of signatures cache entries")="";
   ::arg().laxFile(configname.c_str());
 
-  L.toConsole((Logger::Urgency)(::arg().asNum("loglevel")));  
-
+  L.toConsole(Logger::Error);   // so we print any errors
   BackendMakers().launch(::arg()["launch"]); // vrooooom!
+  L.toConsole((Logger::Urgency)(::arg().asNum("loglevel")));  
   ::arg().laxFile(configname.c_str());    
   //cerr<<"Backend: "<<::arg()["launch"]<<", '" << ::arg()["gmysql-dbname"] <<"'" <<endl;
 
@@ -2196,4 +2196,8 @@ catch(std::exception& e) {
   cerr<<"Error: "<<e.what()<<endl;
   return 1;
 }
-
+catch(...)
+{
+  cerr<<"Caught an unknown exception"<<endl;
+  return 1;
+}