Encapsulates all exceptions which can be thrown by the Yosokumo Service. More...
#include <ServiceException.h>
Public Member Functions | |
ServiceException () | |
Constructs a new default exception. | |
ServiceException (const std::string &message) | |
Constructs a new exception with the specified detail message. | |
ServiceException (const std::string &message, const std::string &failedMethodName) | |
Constructs a new exception with the specified detail message and failed method name. | |
ServiceException (const std::string &message, int statusCode, const std::string &failedMethodName) | |
Constructs a new exception with the specified detail message, status code, and failed method name. | |
ServiceException (const ServiceException &rhs) throw () | |
Copy constructor - initializes a newly created ServiceException object with a copy of another ServiceException object. | |
virtual | ~ServiceException () throw () |
Destructor - destroy a ServiceException object. | |
ServiceException & | operator= (const ServiceException &rhs) throw () |
Assignment operator - assign one ServiceException to another. | |
const char * | what () const throw () |
Return message telling what exception occurred. | |
int | getStatusCode () const |
Return HTTP status code. | |
std::string | getFailedMethodName () const |
Return the name of the Service method which failed with this exception. | |
Private Attributes | |
std::string | detailMessage |
std::string | failedMethodName |
int | statusCode |
Encapsulates all exceptions which can be thrown by the Yosokumo Service.
Definition at line 16 of file ServiceException.h.
ServiceException::ServiceException | ( | ) |
Constructs a new default exception.
Definition at line 7 of file ServiceException.cpp.
ServiceException::ServiceException | ( | const std::string & | message | ) |
Constructs a new exception with the specified detail message.
message | the detail message. The detail message is saved for later retrieval by the what() method. |
Definition at line 13 of file ServiceException.cpp.
ServiceException::ServiceException | ( | const std::string & | message, | |
const std::string & | failedMethodName | |||
) |
Constructs a new exception with the specified detail message and failed method name.
message | the detail message (which is saved for later retrieval by the what() method. | |
failedMethodName | the name of the method which failed with the exception. |
Definition at line 19 of file ServiceException.cpp.
ServiceException::ServiceException | ( | const std::string & | message, | |
int | statusCode, | |||
const std::string & | failedMethodName | |||
) |
Constructs a new exception with the specified detail message, status code, and failed method name.
message | the detail message (which is saved for later retrieval by the what() method. | |
statusCode | the status code from most recent HTTP response. A zero means the most recent HTTP request did not result in a response, e.g., there is no network connection. | |
failedMethodName | the name of the Service method which failed with the exception. |
Definition at line 27 of file ServiceException.cpp.
ServiceException::ServiceException | ( | const ServiceException & | rhs | ) | throw () |
Copy constructor - initializes a newly created ServiceException
object with a copy of another ServiceException
object.
rhs | the ServiceException to make a copy of. |
Definition at line 36 of file ServiceException.cpp.
ServiceException::~ServiceException | ( | ) | throw () [virtual] |
Destructor - destroy a ServiceException
object.
Definition at line 42 of file ServiceException.cpp.
std::string ServiceException::getFailedMethodName | ( | ) | const |
Return the name of the Service method which failed with this exception.
Definition at line 71 of file ServiceException.cpp.
References failedMethodName.
Referenced by Yosokumo::YosokumoDIF::isException().
int ServiceException::getStatusCode | ( | ) | const |
Return HTTP status code.
Definition at line 66 of file ServiceException.cpp.
References statusCode.
Referenced by Yosokumo::YosokumoDIF::isException().
ServiceException & ServiceException::operator= | ( | const ServiceException & | rhs | ) | throw () |
Assignment operator - assign one ServiceException
to another.
rhs | the righthand side of the assignment. |
this
ServiceException. Definition at line 45 of file ServiceException.cpp.
References detailMessage.
const char * ServiceException::what | ( | ) | const throw () |
Return message telling what exception occurred.
Definition at line 61 of file ServiceException.cpp.
References detailMessage.
Referenced by Yosokumo::YosokumoDIF::isException().
std::string Yosokumo::ServiceException::detailMessage [private] |
Definition at line 18 of file ServiceException.h.
Referenced by operator=(), and what().
std::string Yosokumo::ServiceException::failedMethodName [private] |
Definition at line 19 of file ServiceException.h.
Referenced by getFailedMethodName().
int Yosokumo::ServiceException::statusCode [private] |
Definition at line 20 of file ServiceException.h.
Referenced by getStatusCode().