We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d4b0dc commit 1959d80Copy full SHA for 1959d80
mooncake-common/src/default_config.cpp
@@ -47,6 +47,9 @@ void DefaultConfig::loadFromJSON() {
47
Json::Value root;
48
std::ifstream file;
49
file.open(path_);
50
+ if (!file.is_open()) {
51
+ throw std::runtime_error("Failed to open JSON file: " + path_);
52
+ }
53
54
// Read entire file into string
55
std::string json_content((std::istreambuf_iterator<char>(file)),
0 commit comments