Skip to content

Commit

Permalink
[slang-reflect] Fix exception throw when exceptions are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Sustrak committed Feb 16, 2024
1 parent d4f5899 commit 59f0207
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/reflect/src/SvLocalParam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 59f0207

Please sign in to comment.