diff --git a/tools/reflect/src/SvLocalParam.cpp b/tools/reflect/src/SvLocalParam.cpp index a55f34633..f3306ae98 100644 --- a/tools/reflect/src/SvLocalParam.cpp +++ b/tools/reflect/src/SvLocalParam.cpp @@ -34,8 +34,10 @@ void SvLocalParam::toCpp(HppFile& hppFile, std::string_view, const SvAliases&, b unwrapUnpackedArray(parameter.getValue().elements(), unpackedArrays, biggestSize); } SLANG_CATCH(const std::runtime_error& error) { +#if __cpp_exceptions SLANG_THROW(std::runtime_error(fmt::format( "There has been an error while reflecting {}: {}", parameterName, error.what()))); +#endif } if (unpackedArrays.empty()) SLANG_THROW(std::runtime_error(