/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-07-29 06:28:53 UTC
  • Revision ID: edam@waxworlds.org-20100729062853-4i2fec52m86mh724
- made basic_statement::step() protected, for use by query and command only
- moved basic_statement::operator<<() to command and query instead; one needs to accept sqlite::exec, the other doesn't
- added tests for query::operator<<()
- added code to invlaidate in-progress queries during any transaction rollbacks (currently segfaults in basic_statement::finalize())
- added new sqlite_error constructor that obtains a full error message
- implemented database::database_mutex_guard class
- swapped command's step mutex in favour of the database mutex

Show diffs side-by-side

added added

removed removed

32
32
{
33
33
 
34
34
 
 
35
class database;
 
36
 
 
37
 
35
38
/**
36
39
 * Main (base) sqlite exception class.
37
40
 */
44
47
public:
45
48
 
46
49
        /**
 
50
         * Constructor that takes an sqlite error code and a database from which to
 
51
         * determine it's error message
 
52
         * @param code the sqlite error code
 
53
         * @see sqlite_errmsg()
 
54
         */
 
55
        explicit sqlite_error(
 
56
                database &database,
 
57
                int code );
 
58
 
 
59
 
 
60
        /**
47
61
         * Constructor that takes an sqlite error code and determines it's own
48
 
         * error message
 
62
         * generic error message
49
63
         * @param code the sqlite error code
50
64
         */
51
65
        explicit sqlite_error(