2012-12-27 10:43:49 -08:00
|
|
|
#include <iostream>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include "SocketException.h"
|
2013-02-26 11:33:53 -08:00
|
|
|
using namespace NetSocketPP;
|
2012-12-27 10:43:49 -08:00
|
|
|
|
|
|
|
SocketException::SocketException(std::string msg) {
|
|
|
|
_msg = msg;
|
|
|
|
}
|
|
|
|
|
|
|
|
SocketException::~SocketException() throw() {
|
|
|
|
_msg = "";
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* SocketException::what() const throw() {
|
|
|
|
std::string str = "";
|
2013-02-26 11:33:53 -08:00
|
|
|
str += "Error occured in NetSocket++: ";
|
2012-12-27 10:43:49 -08:00
|
|
|
str += _msg;
|
|
|
|
return str.c_str();
|
|
|
|
}
|