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