psocksxx  1.0.0
sockexception.h
1 /*
2 * psocksxx - A C++ wrapper for POSIX sockets
3 * Copyright (C) 2013 Uditha Atukorala
4 *
5 * This software library is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This software library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this software library. If not, see <http://www.gnu.org/licenses/>.
17 *
18 */
19 
20 #ifndef PSOCKSXX_SOCKEXCEPTION_H
21 #define PSOCKSXX_SOCKEXCEPTION_H
22 
23 #include <exception>
24 #include <cstddef>
25 #include <string>
26 
27 
28 namespace psocksxx {
29 
35  class sockexception : public std::exception {
36  public:
46  sockexception( const char * message = 0 ) throw();
47 
48  virtual ~sockexception() throw();
49 
59  const char * what() const throw();
60 
61  protected:
63  std::string _message;
64 
66  int _errno;
67 
69  std::string _sys_msg;
70 
71  };
72 
73 } /* end of namespace psocksxx */
74 
75 #endif /* !PSOCKSXX_SOCKEXCEPTION_H */
76 
virtual ~sockexception()
destructor
Definition: sockexception.cpp:50
Socket exception.
Definition: sockexception.h:35
const char * what() const
Returns exception message.
Definition: sockexception.cpp:55
std::string _sys_msg
Definition: sockexception.h:69
Definition: iosocks.cpp:23
int _errno
Definition: sockexception.h:66
sockexception(const char *message=0)
constructor
Definition: sockexception.cpp:28
std::string _message
Definition: sockexception.h:63