libsocket
exception.hpp
Go to the documentation of this file.
1 #ifndef LIBSOCKET_EXCEPTION_H_07F57E018FF44ADBB169FA2F685EA87E
2 #define LIBSOCKET_EXCEPTION_H_07F57E018FF44ADBB169FA2F685EA87E
3 
4 #include <string>
5 
13 /*
14  The committers of the libsocket project, all rights reserved
15  (c) 2012, dermesser <lbo@spheniscida.de>
16 
17  Redistribution and use in source and binary forms, with or without
18  modification, are permitted provided that the following conditions are met:
19 
20  1. Redistributions of source code must retain the above copyright notice,
21  this list of conditions and the following disclaimer.
22  2. Redistributions in binary form must reproduce the above copyright notice,
23  this list of conditions and the following disclaimer in the documentation
24  and/or other materials provided with the distribution.
25 
26  THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS “AS IS” AND ANY
27  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
28  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
29  DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
30  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
31  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
33  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 
37  */
38 
39 namespace libsocket {
40 using std::string;
53  int err;
54  string mesg;
55 
62  socket_exception(const string& file, int line, const string& message,
63  bool show_errno = true);
64 };
68 } // namespace libsocket
69 #endif
Contains libsocket elements.
Definition: dgramclient.hpp:41
This class is instantiated and thrown when an error occurs. If there's an error somewhere in libsocke...
Definition: exception.hpp:52
socket_exception(const string &file, int line, const string &message, bool show_errno=true)
Constructor of a socket_exception object.
Definition: exception.cpp:67
int err
This is the value of errno when the error occurred.
Definition: exception.hpp:53