Exceptions handling in constructor for genericSocket, created object to handle both socket descriptors upon throwing exception in constructor (as raw pointers wont get destructed automatically)

This commit is contained in:
2018-08-09 15:43:56 +02:00
parent ab7e63c20f
commit 1102153d2b
14 changed files with 309 additions and 357 deletions

View File

@ -9,19 +9,18 @@
#include <iostream>
#include <exception>
using namespace std;
struct SharedMemoryException : public exception {
struct SharedMemoryException : public std::exception {
public:
SharedMemoryException() {}
string GetMessage() const { return "Shared Memory Failed";};
std::string GetMessage() const { return "Shared Memory Failed";};
};
struct ThreadpoolException : public exception {
struct ThreadpoolException : public std::exception {
public:
ThreadpoolException() {}
string GetMessage() const { return "Threadpool Failed";};
std::string GetMessage() const { return "Threadpool Failed";};
};
struct SocketException : public std::exception {