mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-11-01 19:17:47 +00:00
Debugging
This commit is contained in:
@@ -2447,11 +2447,7 @@ namespace OpenWifi {
|
|||||||
return;
|
return;
|
||||||
throw std::invalid_argument(value + " is not a valid IP address.");
|
throw std::invalid_argument(value + " is not a valid IP address.");
|
||||||
} else {
|
} else {
|
||||||
try {
|
nlohmann::json_schema::default_string_format_check(format,value);
|
||||||
nlohmann::json_schema::default_string_format_check(format,value);
|
|
||||||
} catch (const std::logic_error &E) {
|
|
||||||
std::string Error{"JSON Schema validation: "};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2461,6 +2457,12 @@ namespace OpenWifi {
|
|||||||
auto Doc = json::parse(C);
|
auto Doc = json::parse(C);
|
||||||
Validator_->validate(Doc);
|
Validator_->validate(Doc);
|
||||||
return true;
|
return true;
|
||||||
|
} catch (const std::invalid_argument &E) {
|
||||||
|
Error = E.what();
|
||||||
|
return false;
|
||||||
|
} catch (const std::logic_error &E) {
|
||||||
|
Error = E.what();
|
||||||
|
return false;
|
||||||
} catch(const std::exception &E) {
|
} catch(const std::exception &E) {
|
||||||
Error = E.what();
|
Error = E.what();
|
||||||
std::cout << "Validation failed, here is why: " << E.what() << "\n";
|
std::cout << "Validation failed, here is why: " << E.what() << "\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user