This message is a general failure message. For generalized request-reply mechanisms, the server side code cannot terminate with an exception. In these truly exceptional situations, this generic failure message can be returned.
More...
#include "umps/messageFormats/failure.hpp"
This message is a general failure message. For generalized request-reply mechanisms, the server side code cannot terminate with an exception. In these truly exceptional situations, this generic failure message can be returned.
- Copyright
- Ben Baker (University of Utah) distributed under the MIT license.
◆ Failure() [1/2]
UMPS::MessageFormats::Failure::Failure |
( |
const Failure & |
message | ) |
|
Copy constructor.
- Parameters
-
[in] | message | The failure message class from which to initialize this class. |
◆ Failure() [2/2]
UMPS::MessageFormats::Failure::Failure |
( |
Failure && |
message | ) |
|
|
noexcept |
Move constructor.
- Parameters
-
[in,out] | message | The failure message class from which to initialize this class. On exit, message's behavior is undefined. |
◆ clone()
◆ createInstance()
◆ fromMessage() [1/2]
void UMPS::MessageFormats::Failure::fromMessage |
( |
const char * |
data, |
|
|
size_t |
length |
|
) |
| |
|
finalvirtual |
Creates the class from a message.
- Parameters
-
[in] | data | The contents of the message. This is an array whose dimension is [length] |
[in] | length | The length of data. |
- Exceptions
-
std::runtime_error | if the message is invalid. |
std::invalid_argument | if data is NULL or length is 0.
|
Implements UMPS::MessageFormats::IMessage.
◆ fromMessage() [2/2]
void UMPS::MessageFormats::Failure::fromMessage |
( |
const std::string & |
message | ) |
|
|
finalvirtual |
Creates the class from a message.
- Parameters
-
[in] | message | The contents of the message. |
- Exceptions
-
std::runtime_error | if the message is invalid. |
std::invalid_argument | if data.empty() is true. |
Implements UMPS::MessageFormats::IMessage.
◆ getDetails()
std::string UMPS::MessageFormats::Failure::getDetails |
( |
| ) |
const |
|
noexcept |
- Returns
- The failure details.
◆ getMessageType()
std::string UMPS::MessageFormats::Failure::getMessageType |
( |
| ) |
const |
|
finalvirtualnoexcept |
◆ getMessageVersion()
std::string UMPS::MessageFormats::Failure::getMessageVersion |
( |
| ) |
const |
|
finalvirtualnoexcept |
◆ operator=() [1/2]
Failure& UMPS::MessageFormats::Failure::operator= |
( |
const Failure & |
message | ) |
|
Copy assignment.
- Parameters
-
[in] | message | The failure message class to copy to this. |
- Returns
- A deep copy of the failure message.
◆ operator=() [2/2]
Failure& UMPS::MessageFormats::Failure::operator= |
( |
Failure && |
message | ) |
|
|
noexcept |
Move assignment.
- Parameters
-
[in,out] | message | The failure message class whose memory will be moved to this. On exit, messages's behavior is undefined. |
- Returns
- The memory from message moved to this.
◆ setDetails()
void UMPS::MessageFormats::Failure::setDetails |
( |
const std::string & |
details | ) |
|
|
noexcept |
Sets the details of a failure message.
- Parameters
-
[in] | details | The failure details to set. |
◆ toMessage()
std::string UMPS::MessageFormats::Failure::toMessage |
( |
| ) |
const |
|
finalvirtual |
Converts the failure class to a string message.
- Returns
- The class expressed as a string message.
- Exceptions
-
std::runtime_error | if the required information is not set. |
- Note
- Though the container is a string the message need not be human readable.
Implements UMPS::MessageFormats::IMessage.
The documentation for this class was generated from the following file: