00001 #ifndef OSQL_ERROR_H
00002 #define OSQL_ERROR_H
00003
00004 #include <qstring.h>
00005 #include <qvaluelist.h>
00006
00007
00008 namespace Opie {
00009 namespace DB {
00013 class OSQLError {
00014 public:
00015 typedef QValueList<OSQLError> ValueList;
00016 enum Type { None = 0,
00017 Internal,
00018 Unknown,
00019 Transaction,
00020 Statement,
00021 Connection,
00022 Driver
00023 };
00024 enum DriverError {
00025 DriverInternal=0,
00026 Permission,
00027 Abort,
00028 Busy,
00029 Locked,
00030 NoMem,
00031 ReadOnly,
00032 Interrupt,
00033 IOErr,
00034 Corrupt,
00035 NotFound,
00036 Full,
00037 CantOpen,
00038 Protocol,
00039 Schema,
00040 TooBig,
00041 Mismatch,
00042 Misuse
00043 };
00044 OSQLError( const QString& driverText = QString::null,
00045 const QString& driverDatabaseText = QString::null,
00046 int type = None, int subNumber = -1 );
00047 ~OSQLError();
00048
00049 QString driverText()const;
00050 QString databaseText()const;
00051 int type()const;
00052 int subNumber()const;
00053 private:
00054 QString m_drvText;
00055 QString m_drvDBText;
00056 int m_type;
00057 int m_number;
00058 class OSQLErrorPrivate;
00059 OSQLErrorPrivate* d;
00060 };
00061
00062 }
00063 }
00064 #endif