/sqlite3cc

To get this branch, use:
bzr branch http://bzr.ed.am/sqlite3cc

« back to all changes in this revision

Viewing changes to include/sqlite3cc/exception.h

  • Committer: edam
  • Date: 2010-01-31 21:12:21 UTC
  • Revision ID: edam@waxworlds.org-20100131211221-5xtrhfrchozhk326
- rewrote transaction classes and added transaction_guard
- removed leftover code (sqlite_busy error)
- added tests for transactions

Show diffs side-by-side

added added

removed removed

1
1
/*
2
 
 * exception.hpp
 
2
 * exception.h
3
3
 *
4
4
 * Copyright (C) 2009 Tim Marston <edam@waxworlds.org>
5
5
 *
6
 
 * This file is part of sqlitepp (hereafter referred to as "this program").
7
 
 * See http://www.waxworlds.org/edam/software/sqlitepp for more information.
 
6
 * This file is part of sqlite3cc (hereafter referred to as "this program").
 
7
 * See http://www.waxworlds.org/edam/software/sqlite3cc for more information.
8
8
 *
9
9
 * This program is free software: you can redistribute it and/or modify
10
10
 * it under the terms of the GNU Lesser General Public License as published
20
20
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
21
 */
22
22
 
23
 
#ifndef EXCEPTION_HPP_
24
 
#define EXCEPTION_HPP_
 
23
#ifndef SQLITE3CC_EXCEPTION_H_
 
24
#define SQLITE3CC_EXCEPTION_H_
25
25
 
26
26
 
27
27
#include <sqlite3.h>
48
48
         * error message
49
49
         * @param error_code the sqlite error code
50
50
         */
51
 
        sqlite_error(
 
51
        explicit sqlite_error(
52
52
                int error_code );
53
53
 
54
54
        /**
57
57
         * @param message a customer error message string
58
58
         * @param error_code the sqlite error code
59
59
         */
60
 
        sqlite_error(
 
60
        explicit sqlite_error(
61
61
                const std::string &message,
62
62
                int error_code = SQLITE_ERROR );
63
63
 
100
100
};
101
101
 
102
102
 
103
 
}
104
 
 
105
 
 
106
 
#endif /* EXCEPTION_HPP_ */
 
103
} // namespace sqlite
 
104
 
 
105
 
 
106
#endif /* SQLITE3CC_EXCEPTION_H_ */