From 0ea527ed6005d4d3680ed1ef17bba356be2ac964 Mon Sep 17 00:00:00 2001 From: Alex Fabijanic Date: Mon, 5 Jul 2021 09:27:33 +0200 Subject: [PATCH] feat(Socket): expose error() --- Net/include/Poco/Net/Socket.h | 5 ++++- Net/src/Socket.cpp | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Net/include/Poco/Net/Socket.h b/Net/include/Poco/Net/Socket.h index bc408609d..3f7109c8a 100644 --- a/Net/include/Poco/Net/Socket.h +++ b/Net/include/Poco/Net/Socket.h @@ -355,7 +355,10 @@ public: /// into buffers). static int lastError(); - /// Returns the last socket error. + /// Returns the last error code. + + static void error(); + /// Throws an appropriate exception for the last error. protected: Socket(SocketImpl* pImpl); diff --git a/Net/src/Socket.cpp b/Net/src/Socket.cpp index 0bd5610f3..0ab76d29e 100644 --- a/Net/src/Socket.cpp +++ b/Net/src/Socket.cpp @@ -493,4 +493,10 @@ int Socket::lastError() } +void Socket::error() +{ + SocketImpl::error(); +} + + } } // namespace Poco::Net