/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-03-09 14:06:50 UTC
  • Revision ID: edam@waxworlds.org-20100309140650-oqwnsrbajh8d2p2m
- moved dependancy on boost_filesystem-mt from the library to test-main

Show diffs side-by-side

added added

removed removed

32
32
{
33
33
 
34
34
 
35
 
class database;
36
 
 
37
 
 
38
35
/**
39
36
 * Main (base) sqlite exception class.
40
37
 */
47
44
public:
48
45
 
49
46
        /**
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
 
        /**
61
47
         * Constructor that takes an sqlite error code and determines it's own
62
 
         * generic error message
63
 
         * @param code the sqlite error code
 
48
         * error message
 
49
         * @param error_code the sqlite error code
64
50
         */
65
51
        explicit sqlite_error(
66
 
                int code );
 
52
                int error_code );
67
53
 
68
54
        /**
69
55
         * Constructor that allows the creation of an sqlite error with a custom
70
56
         * message.
71
57
         * @param message a customer error message string
72
 
         * @param code the sqlite error code
 
58
         * @param error_code the sqlite error code
73
59
         */
74
60
        explicit sqlite_error(
75
61
                const std::string &message,
76
 
                int code = SQLITE_ERROR );
 
62
                int error_code = SQLITE_ERROR );
77
63
 
78
64
        virtual ~sqlite_error() throw( );
79
65
 
85
71
         * Get the sqlite error code associated with this error
86
72
         * @returns the sqlite error code
87
73
         */
88
 
        int get_code() const;
 
74
        int get_error_code() const;
89
75
 
90
76
        /**
91
77
         * Get the error message
102
88
         * @param the sqlite error code
103
89
         * @returns the automatic string
104
90
         */
105
 
        const std::string &get_message(
106
 
                int code );
 
91
        const std::string &get_error_message(
 
92
                int error_code );
107
93
 
108
94
        /** the error code */
109
 
        int _code;
 
95
        int _error_code;
110
96
 
111
97
        /** the message string */
112
98
        std::string _message;