Yosokumo::ServiceException Class Reference

Encapsulates all exceptions which can be thrown by the Yosokumo Service. More...

#include <ServiceException.h>

List of all members.

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.
ServiceExceptionoperator= (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

Detailed Description

Encapsulates all exceptions which can be thrown by the Yosokumo Service.

Definition at line 16 of file ServiceException.h.


Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.


Member Function Documentation

std::string ServiceException::getFailedMethodName (  )  const

Return the name of the Service method which failed with this exception.

Returns:
name of the Service method which failed.

Definition at line 71 of file ServiceException.cpp.

References failedMethodName.

Referenced by Yosokumo::YosokumoDIF::isException().

int ServiceException::getStatusCode (  )  const

Return HTTP status code.

Returns:
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.

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.

Parameters:
rhs the righthand side of the assignment.
Returns:
a reference to this ServiceException.

Definition at line 45 of file ServiceException.cpp.

References detailMessage.

const char * ServiceException::what (  )  const throw ()

Return message telling what exception occurred.

Returns:
message telling what exception occurred.

Definition at line 61 of file ServiceException.cpp.

References detailMessage.

Referenced by Yosokumo::YosokumoDIF::isException().


Member Data Documentation

Definition at line 18 of file ServiceException.h.

Referenced by operator=(), and what().

Definition at line 19 of file ServiceException.h.

Referenced by getFailedMethodName().

Definition at line 20 of file ServiceException.h.

Referenced by getStatusCode().


The documentation for this class was generated from the following files:
Generated on Mon May 13 09:19:12 2013 for C++ Yosokumo API by  doxygen 1.6.3