WinsockErrorException class
Exception carrying a WinsockErrorCode.
- Use
import ThinkMeta.ConcurrentTasks.Windows.WinsockError;- Namespace
ThinkMeta::ConcurrentTasks::Windows
Syntax
class WinsockErrorExceptionRemarks
For callers that prefer exceptions over error codes.
Constructors
WinsockErrorException
Wraps errorCode.
Syntax
explicit WinsockErrorException(WinsockErrorCode errorCode) noexcept;Parameters
errorCodeWinsockErrorCode- The Winsock error code to carry, normally a failure code.
Methods
GetErrorCode
The wrapped error code.
Syntax
WinsockErrorCode GetErrorCode() const noexcept;Return value
Type: WinsockErrorCode
The error code passed to the constructor.
Throw
Throws a WinsockErrorException for errorCode.
Syntax
[[noreturn]] static void Throw(WinsockErrorCode errorCode);Parameters
errorCodeWinsockErrorCode- The Winsock error code the exception carries.
Without exception support: ends the process (__fastfail) instead of throwing.
Syntax
[[noreturn]] static void Throw(
[[maybe_unused]] WinsockErrorCode errorCode
) noexcept;Parameters
errorCodeWinsockErrorCode- The Winsock error code; not used, the process ends.
Remarks
There is nothing to unwind, so a failure the caller cannot be told about ends the process here.
ThrowIfFailed
Throws if errorCode is not WinsockError::Success.
Syntax
static void ThrowIfFailed(WinsockErrorCode errorCode);Parameters
errorCodeWinsockErrorCode- The Winsock error code to check; any value but
WinsockError::Successthrows.
Remarks
Without exception support it ends the process instead.
See also
Generated from ThinkMeta.ConcurrentTasks.API @ 137ec1d (2026-10-17).