]> granicus.if.org Git - pdns/commitdiff
make sure we don't throw an exception on "pdns_control show" of an unknown variable
authorbert hubert <bert.hubert@netherlabs.nl>
Thu, 11 Dec 2014 14:11:45 +0000 (15:11 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Thu, 11 Dec 2014 14:11:45 +0000 (15:11 +0100)
pdns/dynhandler.cc

index 98a1a9a7a354709340cf02ec53c28a55d051bc4c..c0b92441d89ae2acc0e4a0d03aaf9eb469fb5900 100644 (file)
@@ -78,6 +78,7 @@ string DLPingHandler(const vector<string>&parts, Utility::pid_t ppid)
 }
 
 string DLShowHandler(const vector<string>&parts, Utility::pid_t ppid)
+try
 {
   extern StatBag S;
   string ret("Wrong number of parameters");
@@ -90,7 +91,10 @@ string DLShowHandler(const vector<string>&parts, Utility::pid_t ppid)
 
   return ret;
 }
-
+catch(...)
+{
+  return "Unknown";
+}
 
 void setStatus(const string &str)
 {