From: Fred Morcos Date: Wed, 3 Aug 2022 11:05:17 +0000 (+0200) Subject: Revert "Merge pull request #11820 from omoerbeek/rec-load-lua-errhandling" X-Git-Tag: rec-4.8.0-alpha1~40^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd2d95cd762cfdc374e272de6a7d9422979d801b;p=thirdparty%2Fpdns.git Revert "Merge pull request #11820 from omoerbeek/rec-load-lua-errhandling" This reverts commit 90d8b86d0943feb2d07eab78ce1f7f6ec0fcc9df, reversing changes made to 0ba3a05f9e52bccc0be6e6053744a2fcd41cc677. --- diff --git a/pdns/lua-base4.hh b/pdns/lua-base4.hh index f587f4223f..9394de4f84 100644 --- a/pdns/lua-base4.hh +++ b/pdns/lua-base4.hh @@ -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 diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index c5c77e10a8..48685818dc 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -2321,10 +2321,7 @@ static void recursorThread() try { if (!::arg()["lua-dns-script"].empty()) { t_pdl = std::make_shared(); - 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"]))); }