]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2390] Include bad data in the exception message
authorMukund Sivaraman <muks@isc.org>
Thu, 31 Jan 2013 00:16:15 +0000 (05:46 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 31 Jan 2013 00:16:15 +0000 (05:46 +0530)
src/lib/dns/rdata/generic/mx_15.cc

index c2001ca76d55a2588067cf9b53eeb1895cbdbbaa..f30687033ae3a0ec2041767ce195ea3ad52e7688 100644 (file)
@@ -70,7 +70,8 @@ MX::MX(const std::string& mx_str) :
         const uint32_t num =
             lexer.getNextToken(MasterToken::NUMBER).getNumber();
         if (num > 65535) {
-            isc_throw(InvalidRdataText, "Invalid MX preference");
+            isc_throw(InvalidRdataText, "Invalid MX preference in: "
+                      << mx_str);
         }
         preference_ = static_cast<uint16_t>(num);
 
@@ -110,7 +111,7 @@ MX::MX(MasterLexer& lexer, const Name* origin,
 {
     const uint32_t num = lexer.getNextToken(MasterToken::NUMBER).getNumber();
     if (num > 65535) {
-        isc_throw(InvalidRdataText, "Invalid MX preference");
+        isc_throw(InvalidRdataText, "Invalid MX preference: " << num);
     }
     preference_ = static_cast<uint16_t>(num);