refactoring
This commit is contained in:
@@ -112,6 +112,9 @@ private:
|
||||
template <typename dest>
|
||||
auto get_value(const json &json_document, const std::string &name, dest &dst,
|
||||
bool &success_flag) -> bool {
|
||||
constexpr const auto *function_name =
|
||||
static_cast<const char *>(__FUNCTION__);
|
||||
|
||||
auto ret = false;
|
||||
try {
|
||||
if (json_document.find(name) != json_document.end()) {
|
||||
@@ -121,7 +124,7 @@ private:
|
||||
success_flag = false;
|
||||
}
|
||||
} catch (const json::exception &ex) {
|
||||
utils::error::raise_error(__FUNCTION__, ex, "exception occurred");
|
||||
utils::error::raise_error(function_name, ex, "exception occurred");
|
||||
success_flag = false;
|
||||
ret = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user