ulxr_except.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                     ulxr_except.h  -  exception handling
00003                              -------------------
00004     begin                : Sun Mar 24 2002
00005     copyright            : (C) 2002-2007 by Ewald Arnold
00006     email                : ulxmlrpcpp@ewald-arnold.de
00007 
00008     $Id: ulxr_except.h 940 2006-12-30 18:22:05Z ewald-arnold $
00009 
00010  ***************************************************************************/
00011 
00012 /**************************************************************************
00013  *
00014  * This program is free software; you can redistribute it and/or modify
00015  * it under the terms of the GNU Lesser General Public License as
00016  * published by the Free Software Foundation; either version 2 of the License,
00017  * or (at your option) any later version.
00018  *
00019  * This program is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU Lesser General Public License
00025  * along with this program; if not, write to the Free Software
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00027  *
00028  ***************************************************************************/
00029 
00030 #ifndef ULXR_EXCEPT_H
00031 #define ULXR_EXCEPT_H
00032 
00033 #include <ulxmlrpcpp/ulxmlrpcpp.h>  // always first header
00034 
00035 #include <exception>
00036 
00037 
00038 namespace ulxr {
00039 
00040 
00044 class ULXR_API_DECL0 Exception
00045 #ifdef ULXR_USE_STD_EXCEPTION
00046    : public std::exception
00047 #endif
00048 {
00049  public:
00050 
00055    Exception(int fc, const CppString &s);
00056 
00059    virtual ~Exception()  throw();
00060 
00064    virtual CppString why() const;
00065 
00069    virtual int getFaultCode() const;
00070 
00071 #ifdef ULXR_USE_STD_EXCEPTION
00072 
00078     virtual const char *what() const throw();
00079 #endif
00080 
00081  private:
00082 
00083   CppString reason;
00084   int    faultcode;
00085 #ifdef ULXR_USE_STD_EXCEPTION
00086   mutable std::string  what_helper;
00087 #endif
00088 };
00089 
00090 
00093 class ULXR_API_DECL0 ConnectionException : public Exception
00094 {
00095  public:
00096 
00102    ConnectionException(int fc, const CppString &phrase, int stat);
00103 
00106    virtual ~ConnectionException()  throw();
00107 
00111    int getStatusCode() const;
00112 
00113  private:
00114 
00115    int    status;
00116 };
00117 
00118 
00121 class ULXR_API_DECL0 RuntimeException : public Exception
00122 {
00123  public:
00124 
00129    RuntimeException(int fc, const CppString &s);
00130 
00133    virtual ~RuntimeException()  throw();
00134 };
00135 
00136 
00139 class ULXR_API_DECL0 XmlException : public Exception
00140 {
00141  public:
00142 
00149    XmlException(int fc, const CppString &s, int l, const CppString &err);
00150 
00153    virtual ~XmlException()  throw();
00154 
00158    int getErrorLine() const;
00159 
00163    CppString getErrorString() const;
00164 
00165  private:
00166 
00167   int        line;
00168   CppString  xmlerror;
00169 };
00170 
00171 
00175 class ULXR_API_DECL0 ParameterException : public Exception
00176 {
00177  public:
00178 
00183    ParameterException(int fc, const CppString &s);
00184 
00187    virtual ~ParameterException()  throw();
00188 };
00189 
00190 
00194 class ULXR_API_DECL0 MethodException : public Exception
00195 {
00196  public:
00197 
00202    MethodException(int fc, const CppString &s);
00203 
00206    virtual ~MethodException()  throw();
00207 };
00208 
00209 
00210 } // namespace
00211 
00212 
00213 #endif // ULXR_EXCEPT_H
00214 

Generated on Sun Aug 19 20:08:57 2007 for ulxmlrpcpp by  doxygen 1.5.1