From 86352e32f449ecf00de254674b7dcac72bc34a14 Mon Sep 17 00:00:00 2001 From: zecke Date: Tue, 27 Aug 2002 20:17:50 +0000 Subject: Initial check in of the light wrapper library around normal SQL The first driver implementation is a SQLite version --- (limited to 'libsql/osqlerror.h') diff --git a/libsql/osqlerror.h b/libsql/osqlerror.h new file mode 100644 index 0000000..35a4368 --- a/dev/null +++ b/libsql/osqlerror.h @@ -0,0 +1,59 @@ +#ifndef OSQL_ERROR_H +#define OSQL_ERROR_H + +#include +#include + +/** + * OSQLError is the base class of all errors + */ +class OSQLError { +public: + typedef QValueList 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 -- cgit v0.9.0.2