Clarify PacketTagList::Add assert message
authorTommaso Pecorella <tommaso.pecorella@unifi.it>
Thu, 05 Nov 2015 12:42:24 +0100
changeset 11751 bcd718a8232d
parent 11750 b989e1719a5a
child 11752 4a7e36539482
Clarify PacketTagList::Add assert message
src/network/model/packet-tag-list.cc
--- a/src/network/model/packet-tag-list.cc	Fri Nov 06 23:09:19 2015 +0100
+++ b/src/network/model/packet-tag-list.cc	Thu Nov 05 12:42:24 2015 +0100
@@ -247,7 +247,7 @@
   // ensure this id was not yet added
   for (struct TagData *cur = m_next; cur != 0; cur = cur->next) 
     {
-      NS_ASSERT (cur->tid != tag.GetInstanceTypeId ());
+      NS_ASSERT_MSG (cur->tid != tag.GetInstanceTypeId (), "Error: cannot add the same kind of tag twice.");
     }
   struct TagData * head = new struct TagData ();
   head->count = 1;