From: Pieter Lexis Date: Thu, 23 Feb 2017 10:08:16 +0000 (+0100) Subject: Throw an error when lua-conf-file can't be loaded X-Git-Tag: rec-4.1.0-alpha1~250^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5078%2Fhead;p=thirdparty%2Fpdns.git Throw an error when lua-conf-file can't be loaded This ensures we cannot start up if the file is unreadable. Closes #4939 --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 900f7abd65..1776ccf15e 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -2704,7 +2704,13 @@ int serviceMain(int argc, char*argv[]) g_dnssecLogBogus = ::arg().mustDo("dnssec-log-bogus"); - loadRecursorLuaConfig(::arg()["lua-config-file"], ::arg().mustDo("daemon")); + try { + loadRecursorLuaConfig(::arg()["lua-config-file"], ::arg().mustDo("daemon")); + } + catch (PDNSException &e) { + L<