00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #define ULXR_NEED_EXPORTS
00031 #include <ulxmlrpcpp/ulxmlrpcpp.h>
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 }