From d06c7e43aa03d1da95ec8083b889960750e1790b Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 30 Jan 2026 22:02:45 +0100 Subject: fix: JSON: error handling improvements. Signed-off-by: Amlal El Mahrouss --- src/lib/JSONManifestBuilder.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lib/JSONManifestBuilder.cc b/src/lib/JSONManifestBuilder.cc index 5983b3c..01b7de2 100644 --- a/src/lib/JSONManifestBuilder.cc +++ b/src/lib/JSONManifestBuilder.cc @@ -44,12 +44,16 @@ bool JSONManifestBuilder::BuildTarget(BuildConfig& config) { nlohmann::json json_obj = nlohmann::json::parse(json); - nlohmann::json description = json_obj["description"]; + try { + nlohmann::json description = json_obj["description"]; - NeBuild::Logger::info() << "nebuild: installing: " << path << std::endl; + NeBuild::Logger::info() << "nebuild: installing: " << path << std::endl; - if (auto res = description.get(); !res.empty()) - NeBuild::Logger::info() << "nebuild: description: " << res << std::endl; + if (auto res = description.get(); !res.empty()) + NeBuild::Logger::info() << "nebuild: description: " << res << std::endl; + } catch (...) { + + } std::string compiler = json_obj["compiler_path"].get(); -- cgit v1.2.3