/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 09:16:26 UTC
  • Revision ID: edam@waxworlds.org-20100729091626-h8fmg0r74eyfo5ae
- fixed error caused by finialising in-progress queries during rollback that were later finaliased by RAII.

Show diffs side-by-side

added added

removed removed

32
32
{
33
33
 
34
34
 
35
 
class connection;
 
35
class database;
36
36
 
37
37
 
38
38
/**
47
47
public:
48
48
 
49
49
        /**
50
 
         * Constructor that takes an sqlite result code and a connection from which
51
 
         * to determine it's error message
52
 
         * @param connection a reference to a connection
53
 
         * @param code the sqlite result code
 
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
54
53
         * @see sqlite_errmsg()
55
54
         */
56
55
        explicit sqlite_error(
57
 
                connection &connection,
 
56
                database &database,
58
57
                int code );
59
58
 
60
59
 
61
60
        /**
62
 
         * Constructor that takes an sqlite result code and determines it's own
 
61
         * Constructor that takes an sqlite error code and determines it's own
63
62
         * generic error message
64
 
         * @param code the sqlite result code
 
63
         * @param code the sqlite error code
65
64
         */
66
65
        explicit sqlite_error(
67
66
                int code );
68
67
 
69
68
        /**
70
 
         * Constructor that allows the creation of an sqlite result with a custom
 
69
         * Constructor that allows the creation of an sqlite error with a custom
71
70
         * message.
72
71
         * @param message a customer error message string
73
 
         * @param code the sqlite result code
 
72
         * @param code the sqlite error code
74
73
         */
75
74
        explicit sqlite_error(
76
75
                const std::string &message,
83
82
public:
84
83
 
85
84
        /**
86
 
         * Get the sqlite result code associated with this error
87
 
         * @returns the sqlite result code
 
85
         * Get the sqlite error code associated with this error
 
86
         * @returns the sqlite error code
88
87
         */
89
88
        int get_code() const;
90
89
 
99
98
private:
100
99
 
101
100
        /**
102
 
         * Retrieve an automatic error message for a given sqlite result code
103
 
         * @param the sqlite result code
 
101
         * Retrieve an automatic error message for a given sqlite error code
 
102
         * @param the sqlite error code
104
103
         * @returns the automatic string
105
104
         */
106
105
        const std::string &get_message(
107
106
                int code );
108
107
 
109
 
        /** the result code */
 
108
        /** the error code */
110
109
        int _code;
111
110
 
112
111
        /** the message string */