From cd2d95cd762cfdc374e272de6a7d9422979d801b Mon Sep 17 00:00:00 2001 From: Fred Morcos Date: Wed, 3 Aug 2022 13:05:17 +0200 Subject: [PATCH] Revert "Merge pull request #11820 from omoerbeek/rec-load-lua-errhandling" This reverts commit 90d8b86d0943feb2d07eab78ce1f7f6ec0fcc9df, reversing changes made to 0ba3a05f9e52bccc0be6e6053744a2fcd41cc677. --- pdns/lua-base4.hh | 2 +- pdns/recursordist/rec-main.cc | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) 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"]))); } -- 2.47.2