Skip to content

Commit c9a18a6

Browse files
print debug [OC-2764]
1 parent e294939 commit c9a18a6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

core/src/registry.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ Family<T>& Registry::Add(const std::string& name, const std::string& help,
108108
std::lock_guard<std::mutex> lock{mutex_};
109109

110110
if (NameExistsInOtherType<T>(name)) {
111+
std::cerr << "Family name already exists with different type (name '" << name
112+
<< "', type: '" << typeid(T).name() << "')"
113+
<< std::endl;
114+
std::cerr << "help: " << help << std::endl;
115+
std::cerr << "labels: ";
116+
for (const auto& label : labels) {
117+
std::cerr << label.first << "=" << label.second << ",";
118+
}
119+
std::cerr << std::endl;
120+
111121
throw std::invalid_argument(
112122
"Family name already exists with different type");
113123
}

0 commit comments

Comments
 (0)