sockexception.h
/*
* psocksxx - A C++ wrapper for POSIX sockets
* Copyright (C) 2013 Uditha Atukorala
*
* This software library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This software library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this software library. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef PSOCKSXX_SOCKEXCEPTION_H
#define PSOCKSXX_SOCKEXCEPTION_H
#include <exception>
#include <cstddef>
#include <string>
namespace psocksxx {
class sockexception : public std::exception {
public:
sockexception( const char * message = 0 ) throw();
virtual ~sockexception() throw();
const char * what() const throw();
protected:
std::string _message;
int _errno;
std::string _sys_msg;
};
} /* end of namespace psocksxx */
#endif /* !PSOCKSXX_SOCKEXCEPTION_H */
psocksxx::sockexception
Socket exception.
Definition: sockexception.h:35
psocksxx::sockexception::sockexception
sockexception(const char *message=0)
constructor
Definition: sockexception.cpp:28
psocksxx::sockexception::~sockexception
virtual ~sockexception()
destructor
Definition: sockexception.cpp:50
psocksxx::sockexception::what
const char * what() const
Returns exception message.
Definition: sockexception.cpp:55
psocksxx::sockexception::_errno
int _errno
Definition: sockexception.h:66
psocksxx::sockexception::_sys_msg
std::string _sys_msg
Definition: sockexception.h:69
psocksxx::sockexception::_message
std::string _message
Definition: sockexception.h:63