]> granicus.if.org Git - pdns/commitdiff
dnsdist: Catch WrongTypeException in client mode
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 10 May 2016 10:19:36 +0000 (12:19 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 10 May 2016 10:19:36 +0000 (12:19 +0200)
pdns/dnsdist-console.cc

index 4e49ae3c3fe31d9a5922412855724eb323033135..f3ba05124752c579538d05a57f5b3cfa434708e5 100644 (file)
@@ -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 {