mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-16 07:46:27 -04:00
refactor(mkdwarfs): catch exceptions when building categorizers
This commit is contained in:
parent
1d426f3331
commit
2c9ea48bd9
@ -1240,9 +1240,14 @@ int mkdwarfs_main(int argc, sys_char** argv, iolayer const& iol) {
|
||||
options.inode.categorizer_mgr =
|
||||
std::make_shared<writer::categorizer_manager>(lgr, path);
|
||||
|
||||
for (auto const& name : categorizers) {
|
||||
options.inode.categorizer_mgr->add(
|
||||
catreg.create(lgr, name, vm, iol.file));
|
||||
try {
|
||||
for (auto const& name : categorizers) {
|
||||
options.inode.categorizer_mgr->add(
|
||||
catreg.create(lgr, name, vm, iol.file));
|
||||
}
|
||||
} catch (std::exception const& e) {
|
||||
LOG_ERROR << "could not create categorizer: " << e.what();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user