File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -255,9 +255,13 @@ ParseResult ConfigReader::ParseConfig(const std::string_view& config_path) {
255255
256256 simdjson::ondemand::parser json_parser;
257257 simdjson::ondemand::document document;
258- CHECK_EQ (json_parser.iterate(file_content).get (document), simdjson::SUCCESS);
258+ if (json_parser.iterate(file_content).get (document)) {
259+ return ParseResult::InvalidContent;
260+ }
259261 simdjson::ondemand::object main_object;
260- CHECK_EQ (document.get_object ().get (main_object), simdjson::SUCCESS);
262+ if (document.get_object ().get (main_object)) {
263+ return ParseResult::InvalidContent;
264+ }
261265
262266 // Get all available namespaces for validation
263267 std::vector<std::string> available_namespaces =
@@ -309,8 +313,9 @@ ParseResult ConfigReader::ParseConfig(const std::string_view& config_path) {
309313 }
310314
311315 simdjson::ondemand::object namespace_object;
312- CHECK_EQ (field.value ().get_object ().get (namespace_object),
313- simdjson::SUCCESS);
316+ if (field.value ().get_object ().get (namespace_object)) {
317+ return ParseResult::InvalidContent;
318+ }
314319
315320 // Process options for this namespace using the unified method
316321 ParseResult result =
You can’t perform that action at this time.
0 commit comments