]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Exit on backend instantiation failure
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 4 Jan 2016 10:43:06 +0000 (11:43 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 12 Jan 2016 16:02:21 +0000 (17:02 +0100)
This also undoes a badly working change made in 74a04266.

modules/bindbackend/bindbackend2.cc
pdns/dnsbackend.cc

index 2ff20b8951fdbba20cb4eebe5b61a2b6aec01d3c..f171352959fc19cdd73ddec2cce93a653cf1e7fc 100644 (file)
@@ -741,7 +741,7 @@ void Bind2Backend::loadConfig(string* status)
     }
     catch(PDNSException &ae) {
       L<<Logger::Error<<"Error parsing bind configuration: "<<ae.reason<<endl;
-      return;
+      throw;
     }
       
     vector<BindDomainInfo> domains=BP.getDomains();
index ed8a16dbb4fc44efa1726558401dad84825e1607..e87e0310720d90531fc5c69b31c34f052e2d5c43 100644 (file)
@@ -209,13 +209,13 @@ vector<DNSBackend *>BackendMakerClass::all(bool metadataOnly)
     L<<Logger::Error<<"Cleaning up"<<endl;
     for(vector<DNSBackend *>::const_iterator i=ret.begin();i!=ret.end();++i)
       delete *i;
-    throw;
+    exit(1);
   } catch(...) {
     // and cleanup
     L<<Logger::Error<<"Caught an exception instantiating a backend, cleaning up"<<endl;
     for(vector<DNSBackend *>::const_iterator i=ret.begin();i!=ret.end();++i)
       delete *i;
-    throw;
+    exit(1);
   }
 
   return ret;