00001
00002
00003 #include "ServiceException.h"
00004
00005 using namespace Yosokumo;
00006
00007 ServiceException::ServiceException() :
00008 detailMessage(""),
00009 failedMethodName(""),
00010 statusCode(0)
00011 {}
00012
00013 ServiceException::ServiceException(const std::string &message) :
00014 detailMessage(message),
00015 failedMethodName(""),
00016 statusCode(0)
00017 {}
00018
00019 ServiceException::ServiceException(
00020 const std::string &message,
00021 const std::string &failedMethodName) :
00022 detailMessage(message),
00023 failedMethodName(failedMethodName),
00024 statusCode(0)
00025 {}
00026
00027 ServiceException::ServiceException(
00028 const std::string &message,
00029 int statusCode,
00030 const std::string &failedMethodName) :
00031 detailMessage(message),
00032 failedMethodName(failedMethodName),
00033 statusCode(statusCode)
00034 {}
00035
00036 ServiceException::ServiceException(const ServiceException &rhs) throw()
00037 {
00038 operator=(rhs);
00039 }
00040
00041
00042 ServiceException::~ServiceException() throw()
00043 {}
00044
00045 ServiceException &ServiceException::operator=(const ServiceException& rhs)
00046 throw()
00047 {
00048 if (this == &rhs)
00049 return *this;
00050
00051 detailMessage = rhs.detailMessage;
00052 failedMethodName = rhs.failedMethodName;
00053 statusCode = rhs.statusCode;
00054
00055 return *this;
00056 }
00057
00058
00059
00060
00061 const char* ServiceException::what() const throw()
00062 {
00063 return detailMessage.c_str();
00064 }
00065
00066 int ServiceException::getStatusCode() const
00067 {
00068 return statusCode;
00069 }
00070
00071 std::string ServiceException::getFailedMethodName() const
00072 {
00073 return failedMethodName;
00074 }
00075
00076