Require all exceptions to provide some text

Otherwise what() returns nullptr and it makes catch handlers somewhat
inconvenient if they need to test for this too.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2025-01-20 16:24:00 +01:00
parent b7de081788
commit 2d9e445e18
2 changed files with 2 additions and 2 deletions

View File

@ -1350,7 +1350,7 @@ namespace winstd
/// \param[in] num Numeric error code
/// \param[in] msg Error message
///
num_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) :
num_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg) :
m_num(num),
runtime_error(msg)
{}

View File

@ -363,7 +363,7 @@ namespace winstd
/// \param[in] num Security provider error code
/// \param[in] msg Error message
///
sec_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<SECURITY_STATUS>(num, msg)
sec_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg) : num_runtime_error<SECURITY_STATUS>(num, msg)
{}
///