From: bert hubert Date: Thu, 11 Dec 2014 14:11:45 +0000 (+0100) Subject: make sure we don't throw an exception on "pdns_control show" of an unknown variable X-Git-Tag: rec-3.7.0-rc1~117 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02feff9fed7ef17d56b54dc547eb21039b6523e5;p=thirdparty%2Fpdns.git make sure we don't throw an exception on "pdns_control show" of an unknown variable --- diff --git a/pdns/dynhandler.cc b/pdns/dynhandler.cc index 98a1a9a7a3..c0b92441d8 100644 --- a/pdns/dynhandler.cc +++ b/pdns/dynhandler.cc @@ -78,6 +78,7 @@ string DLPingHandler(const vector&parts, Utility::pid_t ppid) } string DLShowHandler(const vector&parts, Utility::pid_t ppid) +try { extern StatBag S; string ret("Wrong number of parameters"); @@ -90,7 +91,10 @@ string DLShowHandler(const vector&parts, Utility::pid_t ppid) return ret; } - +catch(...) +{ + return "Unknown"; +} void setStatus(const string &str) {