]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
report an error when we die when .. dnsdist sends us an unexpected answer?!
authorbert hubert <bert.hubert@netherlabs.nl>
Sat, 20 Feb 2016 11:44:26 +0000 (12:44 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Sat, 20 Feb 2016 11:44:26 +0000 (12:44 +0100)
pdns/dnsbulktest.cc

index 1c0985168e97f42c8a67b25692bf10664757c195..18a5dbc65f98ad2782c9bc0ac708d5efe3b51751 100644 (file)
@@ -189,6 +189,7 @@ struct SendReceive
 };
 
 int main(int argc, char** argv)
+try
 {
   po::options_description desc("Allowed options");
   desc.add_options()
@@ -326,3 +327,8 @@ int main(int argc, char** argv)
     cout<<"DBT_OKPERCENTAGEINT="<<(int)((float)sr.d_oks/domains.size()*100)<<endl;
   }
 }
+catch(PDNSException& pe)
+{
+  cerr<<"Fatal error: "<<pe.reason<<endl;
+  exit(EXIT_FAILURE);
+}