Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

exception.h

Go to the documentation of this file.
00001 /*
00002    This file is part of the KDB libraries
00003    Copyright (c) 2000 Praduroux Alessandro <pradu@thekompany.com>
00004  
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009  
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014  
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019 */     
00020 #ifndef EXCEPTION_H
00021 #define EXCEPTION_H
00022 
00023 #ifdef HAVE_CONFIG_H
00024 #include <config.h>
00025 #endif
00026 
00027 #include <qstring.h>
00028 #include <qobject.h>
00029 #include <kdebug.h>
00030 
00031 namespace KDB {
00032 
00042 class Exception : public QObject {
00043 
00044     Q_OBJECT
00045     
00046 public:
00050     Exception (const QString & description) :m_description(description)
00051         {
00052             kdDebug(20000) << k_funcinfo << description << endl;
00053         };
00057     QString description() { return m_description; };
00058 
00059 private:
00060     QString m_description;
00061 
00062 };
00063 
00064 class PluginException : public Exception {
00065     Q_OBJECT
00066 public:
00067     PluginException (const QString & description) : Exception( description ) {};
00068 };
00069 
00070 class PluginNotFound : public PluginException {
00071     Q_OBJECT
00072 public:
00073     PluginNotFound (const QString & description) : PluginException( description ){};
00074 };
00075 
00076 class LibraryError : public PluginException {
00077     Q_OBJECT
00078 public:
00079     LibraryError (const QString & description) : PluginException( description ){};
00080 };
00081 
00082 class UnsupportedCapability: public PluginException {
00083     Q_OBJECT
00084 public:
00085     UnsupportedCapability(const QString & description) : PluginException( description ){};
00086 };
00087 
00088 class DataException : public Exception {
00089     Q_OBJECT
00090 public:
00091     DataException (const QString & description) : Exception( description ){};
00092 };
00093 
00094 class ConversionException : public DataException {
00095     Q_OBJECT
00096 public:
00097     ConversionException (const QString & description) : DataException( description ){};
00098 };
00099 
00100 class ServerError : public DataException {
00101     Q_OBJECT
00102 public:
00103     ServerError (const QString & description) : DataException( description ){};
00104 };
00105 
00106 class ObjectNotFound : public DataException {
00107     Q_OBJECT
00108 public:
00109     ObjectNotFound (const QString & description) : DataException( description ){};
00110 };
00111 
00112 class SQLError : public DataException {
00113     Q_OBJECT
00114 public:
00115     SQLError (const QString & description) : DataException( description ){};
00116 };
00117 
00118 class InvalidRequest : public DataException {
00119     Q_OBJECT
00120 public:
00121     InvalidRequest (const QString & description) : DataException( description ){};
00122 };
00123  
00124 class ConnectionException : public Exception {
00125     Q_OBJECT
00126 public:
00127     ConnectionException (const QString & description) : Exception( description ){};
00128 };
00129 
00130 class HostNotFound : public ConnectionException {
00131     Q_OBJECT
00132 public:
00133     HostNotFound (const QString & description) : ConnectionException( description ){};
00134 };
00135 
00136 class InvalidLogin : public ConnectionException {
00137     Q_OBJECT
00138 public:
00139     InvalidLogin (const QString & description) : ConnectionException( description ){};
00140 };
00141 
00142 }
00143 #endif
00144 
00145 

Generated at Fri Sep 29 16:32:21 2000 for KDB by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000