Line data Source code
1 : /*
2 : * Header:
3 : * libsnapwebsites/src/libdbproxy/exception.h
4 : *
5 : * Description:
6 : * Declare libdbproxy exceptions.
7 : *
8 : * Documentation:
9 : * See the corresponding .cpp file.
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 : #pragma once
37 :
38 : #include <libexcept/exception.h>
39 :
40 : #include <stdexcept>
41 : #include <string>
42 : #include <QString>
43 : #include <QStringList>
44 :
45 :
46 : namespace libdbproxy
47 : {
48 :
49 :
50 :
51 0 : class exception : public std::runtime_error, public libexcept::exception_base_t
52 : {
53 : public:
54 : exception( const QString& what );
55 : exception( const std::string& what );
56 : exception( const char* what );
57 : };
58 :
59 :
60 0 : class logic_exception : public exception
61 : {
62 : public:
63 : logic_exception( const QString& what );
64 : logic_exception( const std::string& what );
65 : logic_exception( const char* what );
66 : };
67 :
68 :
69 0 : class overflow_exception : public exception
70 : {
71 : public:
72 : overflow_exception( const QString& what );
73 : overflow_exception( const std::string& what );
74 : overflow_exception( const char* what );
75 : };
76 :
77 :
78 : }
79 : // namespace casswrapper
80 :
81 : // vim: ts=4 sw=4 et
|