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:
parent
b7de081788
commit
2d9e445e18
@ -1350,7 +1350,7 @@ namespace winstd
|
|||||||
/// \param[in] num Numeric error code
|
/// \param[in] num Numeric error code
|
||||||
/// \param[in] msg Error message
|
/// \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),
|
m_num(num),
|
||||||
runtime_error(msg)
|
runtime_error(msg)
|
||||||
{}
|
{}
|
||||||
|
@ -363,7 +363,7 @@ namespace winstd
|
|||||||
/// \param[in] num Security provider error code
|
/// \param[in] num Security provider error code
|
||||||
/// \param[in] msg Error message
|
/// \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)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user