]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Revert "Merge pull request #11820 from omoerbeek/rec-load-lua-errhandling"
authorFred Morcos <fred.morcos@open-xchange.com>
Wed, 3 Aug 2022 11:05:17 +0000 (13:05 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 3 Aug 2022 11:05:17 +0000 (13:05 +0200)
This reverts commit 90d8b86d0943feb2d07eab78ce1f7f6ec0fcc9df, reversing
changes made to 0ba3a05f9e52bccc0be6e6053744a2fcd41cc677.

pdns/lua-base4.hh
pdns/recursordist/rec-main.cc

index f587f4223f6dc145071fc6f00f938d2e317eafe1..9394de4f8466c5390d8763f9a4e3b09a573956fc 100644 (file)
@@ -13,7 +13,7 @@ protected:
 
 public:
   BaseLua4();
-  [[nodiscard]] int loadFile(const std::string &fname);
+  int loadFile(const std::string &fname);
   void loadString(const std::string &script);
   void loadStream(std::istream &is);
   virtual ~BaseLua4(); // this is so unique_ptr works with an incomplete type
index c5c77e10a83af1cec11b7dce6e12cca5e6d9f648..48685818dc42b52785f42efbee128414e26ce015 100644 (file)
@@ -2321,10 +2321,7 @@ static void recursorThread()
       try {
         if (!::arg()["lua-dns-script"].empty()) {
           t_pdl = std::make_shared<RecursorLua4>();
-          auto err = t_pdl->loadFile(::arg()["lua-dns-script"]);
-          if (err != 0) {
-            throw std::runtime_error(stringerror(err));
-          }
+          t_pdl->loadFile(::arg()["lua-dns-script"]);
           SLOG(g_log << Logger::Warning << "Loaded 'lua' script from '" << ::arg()["lua-dns-script"] << "'" << endl,
                log->info(Logr::Warning, "Loading Lua script from file", "name", Logging::Loggable(::arg()["lua-dns-script"])));
         }