From: Remi Gacogne Date: Tue, 10 May 2016 10:19:36 +0000 (+0200) Subject: dnsdist: Catch WrongTypeException in client mode X-Git-Tag: auth-4.0.0-beta1~33^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=628377ec12f6dceeba299f9917e305aab8ddf086;p=pdns dnsdist: Catch WrongTypeException in client mode --- diff --git a/pdns/dnsdist-console.cc b/pdns/dnsdist-console.cc index 4e49ae3c3..f3ba05124 100644 --- a/pdns/dnsdist-console.cc +++ b/pdns/dnsdist-console.cc @@ -355,6 +355,10 @@ try throw; } } + catch(const LuaContext::WrongTypeException& e) { + response = "Command returned an object we can't print: " +std::string(e.what()) + "\n"; + // tried to return something we don't understand + } catch(const LuaContext::ExecutionErrorException& e) { response = "Error: " + string(e.what()) + ": "; try {