From: Remi Gacogne Date: Fri, 24 Oct 2025 12:34:46 +0000 (+0200) Subject: dnsdist: Just in case, catch `PDNSException` while loading YAML configuration X-Git-Tag: rec-5.4.0-alpha1~133^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2a5799bf62d0aa747dddbffb71616352c691b71;p=thirdparty%2Fpdns.git dnsdist: Just in case, catch `PDNSException` while loading YAML configuration Signed-off-by: Remi Gacogne --- diff --git a/pdns/dnsdistdist/dnsdist-configuration-yaml.cc b/pdns/dnsdistdist/dnsdist-configuration-yaml.cc index f1467c5291..d97f8898b2 100644 --- a/pdns/dnsdistdist/dnsdist-configuration-yaml.cc +++ b/pdns/dnsdistdist/dnsdist-configuration-yaml.cc @@ -1239,6 +1239,9 @@ bool loadConfigurationFromFile(const std::string& fileName, [[maybe_unused]] boo catch (const ::rust::Error& exp) { errlog("Error while parsing YAML file %s: %s", fileName, exp.what()); } + catch (const PDNSException& exp) { + errlog("Error while processing YAML configuration from file %s: %s", fileName, exp.reason); + } catch (const std::exception& exp) { errlog("Error while processing YAML configuration from file %s: %s", fileName, exp.what()); }