Skip to content

Commit c209a97

Browse files
author
Alexander Perepelkin
committed
bug-141: conservative fix
1 parent 1302186 commit c209a97

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/PropertyConfiguratorImpl.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ namespace log4cpp {
166166
}
167167
}
168168

169-
category.setPriority(priority);
169+
try {
170+
category.setPriority(priority);
171+
} catch (std::invalid_argument& e) {
172+
throw ConfigureFailure(std::string(e.what()) +
173+
" for category '" + categoryName + "'");
174+
}
170175

171176
bool additive = _properties.getBool("additivity." + categoryName, true);
172177
category.setAdditivity(additive);

0 commit comments

Comments
 (0)