From 628377ec12f6dceeba299f9917e305aab8ddf086 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 10 May 2016 12:19:36 +0200 Subject: [PATCH] dnsdist: Catch WrongTypeException in client mode --- pdns/dnsdist-console.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pdns/dnsdist-console.cc b/pdns/dnsdist-console.cc index 4e49ae3c3f..f3ba051247 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 { -- 2.47.2