ulxr_except.cpp

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.cpp 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 #define ULXR_NEED_EXPORTS
00031 #include <ulxmlrpcpp/ulxmlrpcpp.h>  // always first header
00032 
00033 #include <ulxmlrpcpp/ulxr_except.h>
00034 
00035 
00036 namespace ulxr {
00037 
00038 ULXR_API_IMPL0 Exception::Exception(int fc, const CppString &s)
00039   :
00040 #ifdef ULXR_USE_STD_EXCEPTION
00041    std::exception(),
00042 #endif
00043    reason(s), faultcode(fc)
00044 {
00045   ULXR_DOUT("=== Exception: " << s);
00046 }
00047 
00048 
00049 ULXR_API_IMPL0 Exception::~Exception() throw()
00050 {
00051 }
00052 
00053 
00054 ULXR_API_IMPL(CppString) Exception::why() const
00055 {
00056   return reason;
00057 }
00058 
00059 
00060 #ifdef ULXR_USE_STD_EXCEPTION
00061 
00062 ULXR_API_DECL(const char *) Exception::what() const throw()
00063 {
00064   what_helper = getLatin1(why());
00065   return what_helper.c_str();
00066 }
00067 
00068 #endif
00069 
00070 
00071 ULXR_API_IMPL(int) Exception::getFaultCode() const
00072 {
00073   return faultcode;
00074 }
00075 
00076 
00078 
00079 
00080 ULXR_API_IMPL0 ConnectionException::ConnectionException(int fc, const CppString &phrase, int stat)
00081   : Exception(fc, phrase)
00082   , status(stat)
00083 {
00084 }
00085 
00086 
00087 ULXR_API_IMPL0 ConnectionException::~ConnectionException() throw()
00088 {
00089 }
00090 
00091 
00092 ULXR_API_IMPL(int) ConnectionException::getStatusCode() const
00093 {
00094   return status;
00095 }
00096 
00097 
00099 
00100 
00101 ULXR_API_IMPL0 RuntimeException::RuntimeException(int fc, const CppString &s)
00102   : Exception(fc, s)
00103 {
00104 }
00105 
00106 
00107 ULXR_API_IMPL0 RuntimeException::~RuntimeException() throw()
00108 {
00109 }
00110 
00111 
00113 
00114 
00115 ULXR_API_IMPL0 XmlException::XmlException(int fc, const CppString &s, int l,
00116                                        const CppString &err)
00117   : Exception(fc, s), line(l), xmlerror(err)
00118 {
00119 }
00120 
00121 
00122 ULXR_API_IMPL0 XmlException::~XmlException() throw()
00123 {
00124 }
00125 
00126 
00127 ULXR_API_IMPL(int) XmlException::getErrorLine() const
00128 {
00129   return line;
00130 }
00131 
00132 
00133 ULXR_API_IMPL(CppString) XmlException::getErrorString() const
00134 {
00135   return xmlerror;
00136 }
00137 
00138 
00140 
00141 
00142 ULXR_API_IMPL0 ParameterException::ParameterException(int fc, const CppString &s)
00143   : Exception(fc, s)
00144 {
00145 }
00146 
00147 
00148 ULXR_API_IMPL0 ParameterException::~ParameterException()  throw()
00149 {
00150 }
00151 
00152 
00154 
00155 
00156 ULXR_API_IMPL0 MethodException::MethodException(int fc, const CppString &s)
00157   : Exception(fc, s)
00158 {
00159 }
00160 
00161 
00162 ULXR_API_IMPL0 MethodException::~MethodException()  throw()
00163 {
00164 }
00165 
00166 
00167 }  // namespace ulxr

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