Improve error log message for duplicate UUID

We now output the path of the item which use the same UUID.
This commit is contained in:
Allan Odgaard
2013-04-07 13:59:58 +07:00
parent a2128f11cd
commit 58b101a7db

View File

@@ -170,7 +170,7 @@ std::pair<std::vector<bundles::item_ptr>, std::map< oak::uuid_t, std::vector<oak
if(loadedItems.find(uuid) != loadedItems.end())
{
fprintf(stderr, "*** skip %s (item with same UUID already loaded)\n", itemPath.c_str());
fprintf(stderr, "*** skip %s, item with same UUID loaded from %s\n", itemPath.c_str(), text::join((*std::find_if(items.begin(), items.end(), [&uuid](bundles::item_ptr const& item){ return item->uuid() == uuid; }))->paths(), ", ").c_str());
continue;
}