-rw-r--r-- | libopie2/opiedb/osqlerror.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libopie2/opiedb/osqlerror.h b/libopie2/opiedb/osqlerror.h index 35a4368..8fa973d 100644 --- a/libopie2/opiedb/osqlerror.h +++ b/libopie2/opiedb/osqlerror.h | |||
@@ -1,30 +1,33 @@ | |||
1 | #ifndef OSQL_ERROR_H | 1 | #ifndef OSQL_ERROR_H |
2 | #define OSQL_ERROR_H | 2 | #define OSQL_ERROR_H |
3 | 3 | ||
4 | #include <qstring.h> | 4 | #include <qstring.h> |
5 | #include <qvaluelist.h> | 5 | #include <qvaluelist.h> |
6 | 6 | ||
7 | |||
8 | namespace Opie { | ||
9 | namespace DB { | ||
7 | /** | 10 | /** |
8 | * OSQLError is the base class of all errors | 11 | * OSQLError is the base class of all errors |
9 | */ | 12 | */ |
10 | class OSQLError { | 13 | class OSQLError { |
11 | public: | 14 | public: |
12 | typedef QValueList<OSQLError> ValueList; | 15 | typedef QValueList<OSQLError> ValueList; |
13 | enum Type { None = 0, // NoError | 16 | enum Type { None = 0, // NoError |
14 | Internal, // Internal Error in OSQL | 17 | Internal, // Internal Error in OSQL |
15 | Unknown, // Unknown Error | 18 | Unknown, // Unknown Error |
16 | Transaction, // Transaction Error | 19 | Transaction, // Transaction Error |
17 | Statement, // Wrong Statement | 20 | Statement, // Wrong Statement |
18 | Connection, // Connection Error( lost ) | 21 | Connection, // Connection Error( lost ) |
19 | Driver // Driver Specefic error | 22 | Driver // Driver Specefic error |
20 | }; | 23 | }; |
21 | enum DriverError { | 24 | enum DriverError { |
22 | DriverInternal=0, // internal DriverError | 25 | DriverInternal=0, // internal DriverError |
23 | Permission, // Permission Problem | 26 | Permission, // Permission Problem |
24 | Abort, // Abort of the SQL | 27 | Abort, // Abort of the SQL |
25 | Busy, // Busy Error | 28 | Busy, // Busy Error |
26 | Locked, // Locked | 29 | Locked, // Locked |
27 | NoMem, // No Memory | 30 | NoMem, // No Memory |
28 | ReadOnly, // Database is read only | 31 | ReadOnly, // Database is read only |
29 | Interrupt, // Interrupt | 32 | Interrupt, // Interrupt |
30 | IOErr, // IO Error | 33 | IOErr, // IO Error |
@@ -35,25 +38,27 @@ public: | |||
35 | Protocol, // internal protocol error | 38 | Protocol, // internal protocol error |
36 | Schema, // schema changed | 39 | Schema, // schema changed |
37 | TooBig, // Data too big | 40 | TooBig, // Data too big |
38 | Mismatch, // Type mismatch | 41 | Mismatch, // Type mismatch |
39 | Misuse // misuse | 42 | Misuse // misuse |
40 | }; | 43 | }; |
41 | OSQLError( const QString& driverText = QString::null, | 44 | OSQLError( const QString& driverText = QString::null, |
42 | const QString& driverDatabaseText = QString::null, | 45 | const QString& driverDatabaseText = QString::null, |
43 | int type = None, int subNumber = -1 ); | 46 | int type = None, int subNumber = -1 ); |
44 | ~OSQLError(); | 47 | ~OSQLError(); |
45 | 48 | ||
46 | QString driverText()const; | 49 | QString driverText()const; |
47 | QString databaseText()const; | 50 | QString databaseText()const; |
48 | int type()const; | 51 | int type()const; |
49 | int subNumber()const; | 52 | int subNumber()const; |
50 | private: | 53 | private: |
51 | QString m_drvText; | 54 | QString m_drvText; |
52 | QString m_drvDBText; | 55 | QString m_drvDBText; |
53 | int m_type; | 56 | int m_type; |
54 | int m_number; | 57 | int m_number; |
55 | class OSQLErrorPrivate; | 58 | class OSQLErrorPrivate; |
56 | OSQLErrorPrivate* d; | 59 | OSQLErrorPrivate* d; |
57 | }; | 60 | }; |
58 | 61 | ||
62 | } | ||
63 | } | ||
59 | #endif | 64 | #endif |