Skip to content

Commit ebdbd04

Browse files
authored
more detailed error (#467)
1 parent 73c4f14 commit ebdbd04

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

commandLine/src/projects/VSCodeProject.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,17 @@ struct fileJson {
3737
}
3838

3939
void load() {
40+
if (!fs::exists(fileName)) {
41+
ofLogError(VSCodeProject::LOG_NAME) << "JSON file not found " << fileName;
42+
return;
43+
}
44+
4045
std::ifstream ifs(fileName);
4146
try {
4247
data = json::parse(ifs);
4348
} catch (json::parse_error& ex) {
4449
ofLogError(VSCodeProject::LOG_NAME) << "JSON parse error at byte" << ex.byte;
50+
4551
}
4652
}
4753

0 commit comments

Comments
 (0)