mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-17 00:10:03 -04:00
refactor(categorizer): replace exception with assertion
This commit is contained in:
parent
181098e0c0
commit
1d426f3331
@ -369,10 +369,8 @@ void categorizer_registry::register_factory(
|
||||
std::unique_ptr<categorizer_factory const>&& factory) {
|
||||
auto name = factory->name();
|
||||
|
||||
if (!factories_.emplace(name, std::move(factory)).second) {
|
||||
std::cerr << "categorizer factory name conflict (" << name << "\n";
|
||||
std::abort();
|
||||
}
|
||||
DWARFS_CHECK(factories_.emplace(name, std::move(factory)).second,
|
||||
fmt::format("categorizer factory name conflict: {}", name));
|
||||
}
|
||||
|
||||
std::unique_ptr<categorizer> categorizer_registry::create(
|
||||
|
Loading…
x
Reference in New Issue
Block a user