Files
Towards/modules/network/include/exception/SocketException.hpp
T
Martin Slachta a04f0dc262 initial
2026-07-18 14:31:15 +02:00

30 lines
396 B
C++

#pragma once
#include <cstring>
#include <exception>
namespace tw::net {
class SocketException : public std::exception {
int m_errno;
public:
int errno() {
return m_errno;
}
SocketException() {
}
SocketException(int errno) :
m_errno(errno)
{ }
const char* what() const noexcept override {
return std::strerror(m_errno);
}
};
}