]> granicus.if.org Git - pdns/commitdiff
fix up error detection
authorbert hubert <bert.hubert@netherlabs.nl>
Sun, 8 Mar 2015 14:56:14 +0000 (15:56 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Sun, 8 Mar 2015 14:56:52 +0000 (15:56 +0100)
pdns/dnsdist-lua.cc

index 38202f9bc2ab28b7710ee57814b75fe6a7ceee7c..110d9e94ed28099e2fc89f5f6b596c4b305474b3 100644 (file)
@@ -512,8 +512,10 @@ vector<std::function<void(void)>> setupLua(bool client)
     });
   
   g_lua.writeFunction("setKey", [](const std::string& key) {
-      if(B64Decode(key, g_key)) 
-       throw std::runtime_error("Unable to decode "+key+" as Base64");
+      if(B64Decode(key, g_key) < 0) {
+         g_outputBuffer=string("Unable to decode ")+key+" as Base64";
+         errlog("%s", g_outputBuffer);
+       }
     });