Report JSON parsing errors inside the application
This commit is contained in:
parent
1d06834848
commit
a557165850
2
main.cpp
2
main.cpp
|
@ -472,7 +472,7 @@ std::optional<json> load_json(const std::string &filename) {
|
||||||
ifs >> data;
|
ifs >> data;
|
||||||
return data;
|
return data;
|
||||||
} catch (json::parse_error &err) {
|
} catch (json::parse_error &err) {
|
||||||
fprintf(stderr, "Failed to parse JSON file %s: %s\n", filename.c_str(), err.what());
|
tui_abort("Failed to parse JSON file %s: %s", filename.c_str(), err.what());
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue