diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-30 22:02:45 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-30 22:02:45 +0100 |
| commit | d06c7e43aa03d1da95ec8083b889960750e1790b (patch) | |
| tree | d20e33197a1b9c6802cbaca6749bf0f150eddc10 /src/lib/JSONManifestBuilder.cc | |
| parent | 0760932c4532cdfcb15a68cbf5a16d0845d0e9f7 (diff) | |
fix: JSON: error handling improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/lib/JSONManifestBuilder.cc')
| -rw-r--r-- | src/lib/JSONManifestBuilder.cc | 12 |
1 files changed, 8 insertions, 4 deletions
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<std::string>(); !res.empty()) - NeBuild::Logger::info() << "nebuild: description: " << res << std::endl; + if (auto res = description.get<std::string>(); !res.empty()) + NeBuild::Logger::info() << "nebuild: description: " << res << std::endl; + } catch (...) { + + } std::string compiler = json_obj["compiler_path"].get<std::string>(); |
