Packets/80221Bundle: enhanced error message in MIH message validation (once again)
[senf.git] / senf / Packets / 80221Bundle / TLVParser.cc
index d677de8..7474b0b 100644 (file)
@@ -63,7 +63,8 @@ prefix_ void senf::MIHBaseTLVParser::validateTypeLength(boost::uint8_t expectedT
 {
     validateType( expectedType);
     if (length() != expectedLength)
-        throw InvalidMIHPacketException("invalid length in TLV.") << " Type: " << unsigned(type());
+        throw InvalidMIHPacketException("invalid length in TLV.") << " Type: " << unsigned(type())
+                << ", expected length: " << expectedLength << " got " << length();
 }
 
 //-/////////////////////////////////////////////////////////////////////////////////////////////////