Line data Source code
1 : /*
2 : * Text:
3 : * libsnapwebsites/src/libdbproxy/exception.cpp
4 : *
5 : * Description:
6 : * Declaration of libdbproxy exceptions.
7 : *
8 : * Documentation:
9 : * See each function below.
10 : *
11 : * License:
12 : * Copyright (c) 2011-2019 Made to Order Software Corp. All Rights Reserved
13 : *
14 : * https://snapwebsites.org/
15 : * contact@m2osw.com
16 : *
17 : * Permission is hereby granted, free of charge, to any person obtaining a
18 : * copy of this software and associated documentation files (the
19 : * "Software"), to deal in the Software without restriction, including
20 : * without limitation the rights to use, copy, modify, merge, publish,
21 : * distribute, sublicense, and/or sell copies of the Software, and to
22 : * permit persons to whom the Software is furnished to do so, subject to
23 : * the following conditions:
24 : *
25 : * The above copyright notice and this permission notice shall be included
26 : * in all copies or substantial portions of the Software.
27 : *
28 : * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
29 : * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30 : * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
31 : * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
32 : * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
33 : * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
34 : * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 : */
36 : #include "libdbproxy/exception.h"
37 :
38 : #include <sstream>
39 :
40 : #include <execinfo.h>
41 : #include <unistd.h>
42 :
43 : namespace libdbproxy
44 : {
45 :
46 :
47 0 : exception::exception( const QString& what ) : std::runtime_error(what.toUtf8().data()) {}
48 0 : exception::exception( const std::string& what ) : std::runtime_error(what.c_str()) {}
49 0 : exception::exception( const char* what ) : std::runtime_error(what) {}
50 :
51 :
52 0 : logic_exception::logic_exception( const QString& what ) : exception(what.toUtf8().data()) {}
53 0 : logic_exception::logic_exception( const std::string& what ) : exception(what.c_str()) {}
54 0 : logic_exception::logic_exception( const char* what ) : exception(what) {}
55 :
56 :
57 0 : overflow_exception::overflow_exception( const QString& what ) : exception(what.toUtf8().data()) {}
58 0 : overflow_exception::overflow_exception( const std::string& what ) : exception(what.c_str()) {}
59 0 : overflow_exception::overflow_exception( const char* what ) : exception(what) {}
60 :
61 :
62 : }
63 : // namespace libdbproxy
64 :
65 : // vim: ts=4 sw=4 et
|