File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,17 @@ void ItemManager::displayRegisteredDeserializers() {
127127
128128bool ItemManager::hasItem (const std::string& tag) const {
129129 std::lock_guard<std::mutex> lock (mutex_);
130- return items.find (tag) != items.end ();
130+ if (tag.empty ()) {
131+ LOG_CONTEXT (LogLevel::WARNING, " Empty tag provided for hasItem check" , false );
132+ return false ;
133+ }
134+ if (items.find (tag) != items.end ()){
135+ LOG_CONTEXT (LogLevel::DEBUG, " Item with tag '" + tag + " ' exists in ItemManager" , true );
136+ return true ;
137+ } else {
138+ LOG_CONTEXT (LogLevel::DEBUG, " Item with tag '" + tag + " ' does not exist in ItemManager" , false );
139+ return false ;
140+ }
131141}
132142
133143std::string ItemManager::demangleType (const std::string& mangledName) const {
You can’t perform that action at this time.
0 commit comments