Commit 11f5ae7c authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2390] Include bad data in the exception message

parent bc42c4b3
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment