]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1945] fix debuglevel exception being shadowed by another exception
authorAndrei Pavel <andrei@isc.org>
Mon, 19 Aug 2024 14:36:54 +0000 (17:36 +0300)
committerAndrei Pavel <andrei@isc.org>
Thu, 22 Aug 2024 12:47:24 +0000 (15:47 +0300)
"stringValue() called on non-string Element" was being shown instead
of "Unsupported debuglevel value 100, expected 0-99".

src/lib/process/log_parser.cc

index 8db8355c727a489d402c2a22a8f98c35c8569b90..dc067f04f2cbc07013d0f580cac47ce75e569140 100644 (file)
@@ -88,9 +88,9 @@ void LogConfigParser::parseConfigEntry(isc::data::ConstElementPtr entry) {
                 isc_throw(BadValue, "");
             }
         } catch (...) {
-            isc_throw(BadValue, "Unsupported debuglevel value '"
-                      << debuglevel_ptr->stringValue()
-                      << "', expected 0-99 ("
+            isc_throw(BadValue, "Unsupported debuglevel value "
+                      << debuglevel_ptr->intValue()
+                      << ", expected 0-99 ("
                       << debuglevel_ptr->getPosition() << ")");
         }
     }