summaryrefslogtreecommitdiffstats
path: root/Source/cmCMakePresetsGraph.h
diff options
context:
space:
mode:
authorSankhesh Jhaveri <sankhesh.jhaveri@kitware.com>2022-07-21 13:50:25 (GMT)
committerBrad King <brad.king@kitware.com>2022-08-03 14:20:04 (GMT)
commit47929ee98c44d84d9e86e23cc93093f857e11780 (patch)
treead5d32a956df67ba902d18220663e7ddecd2df48 /Source/cmCMakePresetsGraph.h
parent2be09731e0a441b5303344a91c2ba162e9fdf031 (diff)
downloadCMake-47929ee98c44d84d9e86e23cc93093f857e11780.zip
CMake-47929ee98c44d84d9e86e23cc93093f857e11780.tar.gz
CMake-47929ee98c44d84d9e86e23cc93093f857e11780.tar.bz2
presets: Add basic error forwarding from cmake preset json parser
Print errors only if there are errors. Add filename for better introspection, particularly for FileNotFound errors with presets.
Diffstat (limited to 'Source/cmCMakePresetsGraph.h')
-rw-r--r--Source/cmCMakePresetsGraph.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmCMakePresetsGraph.h b/Source/cmCMakePresetsGraph.h
index f1f8662..4f3e108 100644
--- a/Source/cmCMakePresetsGraph.h
+++ b/Source/cmCMakePresetsGraph.h
@@ -52,6 +52,7 @@ public:
TEST_OUTPUT_TRUNCATION_UNSUPPORTED,
};
+ std::string errors;
enum class ArchToolsetStrategy
{
Set,
@@ -407,7 +408,7 @@ private:
ReadFileResult ReadProjectPresetsInternal(bool allowNoFiles);
ReadFileResult ReadJSONFile(const std::string& filename, RootType rootType,
ReadReason readReason,
- std::vector<File*>& inProgressFiles,
- File*& file);
+ std::vector<File*>& inProgressFiles, File*& file,
+ std::string& errMsg);
void ClearPresets();
};