Permalink
Browse files

make sure we don't throw an exception on "pdns_control show" of an un…

…known variable
1 parent 63c8088 commit d45c1f1b44c313688eebcb8fdf073a3ea0932218 @ahupowerdns ahupowerdns committed with mind04 Dec 11, 2014
Showing with 5 additions and 1 deletion.
  1. +5 −1 pdns/dynhandler.cc
View
@@ -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)
{

0 comments on commit d45c1f1

Please sign in to comment.