Allow null error messages in exceptions
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
5498fb0c15
commit
a5e47313f9
@ -75,7 +75,7 @@ namespace winstd
|
||||
/// \param[in] num COM error code
|
||||
/// \param[in] msg Error message
|
||||
///
|
||||
inline com_runtime_error(_In_ error_type num, _In_z_ const char *msg) : num_runtime_error<HRESULT>(num, msg)
|
||||
inline com_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<HRESULT>(num, msg)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1498,7 +1498,7 @@ namespace winstd
|
||||
/// \param[in] num Numeric error code
|
||||
/// \param[in] msg Error message
|
||||
///
|
||||
inline num_runtime_error(_In_ error_type num, _In_z_ const char *msg) :
|
||||
inline num_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) :
|
||||
m_num(num),
|
||||
runtime_error(msg)
|
||||
{
|
||||
@ -1569,7 +1569,7 @@ namespace winstd
|
||||
/// \param[in] num Windows error code
|
||||
/// \param[in] msg Error message
|
||||
///
|
||||
inline win_runtime_error(_In_ error_type num, _In_z_ const char *msg) : num_runtime_error<DWORD>(num, msg)
|
||||
inline win_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<DWORD>(num, msg)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1589,7 +1589,7 @@ namespace winstd
|
||||
///
|
||||
/// \param[in] msg Error message
|
||||
///
|
||||
inline win_runtime_error(_In_z_ const char *msg) : num_runtime_error<DWORD>(GetLastError(), msg)
|
||||
inline win_runtime_error(_In_opt_z_ const char *msg = nullptr) : num_runtime_error<DWORD>(GetLastError(), msg)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -561,7 +561,7 @@ namespace winstd
|
||||
/// \param[in] err EapHost error descriptor
|
||||
/// \param[in] msg Error message
|
||||
///
|
||||
inline eap_runtime_error(_In_ const EAP_ERROR &err, _In_z_ const char *msg) :
|
||||
inline eap_runtime_error(_In_ const EAP_ERROR &err, _In_opt_z_ const char *msg = nullptr) :
|
||||
m_type (err.type ),
|
||||
m_reason (err.dwReasonCode ),
|
||||
m_root_cause_id (err.rootCauseGuid ),
|
||||
|
@ -333,7 +333,7 @@ namespace winstd
|
||||
/// \param[in] num Security provider error code
|
||||
/// \param[in] msg Error message
|
||||
///
|
||||
inline sec_runtime_error(_In_ error_type num, _In_z_ const char *msg) : num_runtime_error<SECURITY_STATUS>(num, msg)
|
||||
inline sec_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<SECURITY_STATUS>(num, msg)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ namespace winstd
|
||||
/// \param[in] num WinSock2 error code
|
||||
/// \param[in] msg Error message
|
||||
///
|
||||
inline ws2_runtime_error(_In_ error_type num, _In_z_ const char *msg) : num_runtime_error<int>(num, msg)
|
||||
inline ws2_runtime_error(_In_ error_type num, _In_opt_z_ const char *msg = nullptr) : num_runtime_error<int>(num, msg)
|
||||
{
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ namespace winstd
|
||||
///
|
||||
/// \param[in] msg Error message
|
||||
///
|
||||
inline ws2_runtime_error(_In_z_ const char *msg) : num_runtime_error<int>(WSAGetLastError(), msg)
|
||||
inline ws2_runtime_error(_In_opt_z_ const char *msg = nullptr) : num_runtime_error<int>(WSAGetLastError(), msg)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user