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 a2f8d9e commit fe9b658Copy full SHA for fe9b658
src/project_parser.cpp
@@ -171,9 +171,12 @@ class TomlCheckerRoot {
171
Project::Project(const Project *parent, const std::string &path, bool build) {
172
const auto toml_path = fs::path(path) / "cmake.toml";
173
if (!fs::exists(toml_path)) {
174
- throw std::runtime_error("No cmake.toml was found!");
+ throw std::runtime_error("File not found '" + toml_path.string() + "'");
175
}
176
const auto toml = toml::parse<toml::discard_comments, tsl::ordered_map, std::vector>(toml_path.string());
177
+ if (toml.size() == 0) {
178
+ throw std::runtime_error("Empty TOML '" + toml_path.string() + "'");
179
+ }
180
181
TomlCheckerRoot checker;
182
0 commit comments