From aca9dd319e412bc7b825034ef7cd3a3808b8ec8c Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Wed, 16 Mar 2022 09:35:26 +0100 Subject: [PATCH] Add some error handling for a std::system call. --- VulkanHppGenerator.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VulkanHppGenerator.cpp b/VulkanHppGenerator.cpp index 4435db0..a801cc1 100644 --- a/VulkanHppGenerator.cpp +++ b/VulkanHppGenerator.cpp @@ -16476,7 +16476,11 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h #if defined( CLANG_FORMAT_EXECUTABLE ) std::cout << "VulkanHppGenerator: Formatting using "; std::string commandString = "\"" CLANG_FORMAT_EXECUTABLE "\" --version "; - (void)std::system( commandString.c_str() ); + int ret = std::system( commandString.c_str() ); + if ( ret != 0 ) + { + std::cout << "VulkanHppGenerator: failed to determine clang_format version with error <" << ret << ">\n"; + } #endif std::cout << "VulkanHppGenerator: Parsing " << filename << std::endl;