sqlitexx 0.0.1
except.hpp
Go to the documentation of this file.
1/*
2 * sqlite3xx - sqlite3 C++ layer, following the ideas of libpqxx
3 * Copyright (C) 2009 Andreas Baumann
4 *
5 * This copyrighted material is made available to anyone wishing to use,
6 * modify, copy, or redistribute it subject to the terms and conditions of
7 * the GNU Lesser General Public License, as published by the Free Software
8 * Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 * License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this distribution; if not, write to:
18 * Free Software Foundation, Inc.
19 * 51 Franklin Street, Fifth Floor
20 * Boston, MA 02110-1301 USA
21 *
22 */
23
24#ifndef SQLITE3XX_EXCEPT_H
25#define SQLITE3XX_EXCEPT_H
26
27#include <stdexcept>
28
29#include "port/dllexport.h"
30
31using namespace std;
32
33namespace sqlite3xx {
34
36 public:
37 virtual ~sqlitexx_exception( ) throw( ) = 0;
38
39 virtual exception &base( ) throw( ) = 0;
40};
41
42class SQLITEXX_LIBEXPORT failure : public sqlitexx_exception, public runtime_error
43{
44 virtual exception &base( ) throw( ) { return *this; }
45
46 public:
47 explicit failure( const string &m );
48};
49
51{
52 string m_q;
53
54 public:
56 explicit sql_error( const string& _q );
57 explicit sql_error( const string& _what, const string& _q );
58 virtual ~sql_error( ) throw( );
59
60 const string& msg( ) const throw( );
61 const string& query( ) const throw( );
62};
63
65{
66 public:
68 explicit database_locked( const string &_what );
69};
70
71} // namespace sqlite3xx
72
73#endif /* SQLITE3XX_EXCEPT_H */
Definition except.hpp:65
database_locked(const string &_what)
Definition except.hpp:43
failure(const string &m)
Definition except.hpp:51
sql_error(const string &_what, const string &_q)
sql_error(const string &_q)
Definition except.hpp:35
#define SQLITEXX_LIBEXPORT
Definition dllexport.h:35
Definition connection.hpp:41