A "network error (or endpoint is down)" failure cause. More...
#include <NetworkError.h>
Public Types | |
enum | ErrorType { TIMEOUT, FAILURE } |
Enumerated type to describe the type of the network error. | |
enum | OperationType { SENDING, RECEIVING } |
Enumerated type to describe whether the network error occured while sending or receiving. | |
Public Member Functions | |
NetworkError (NetworkError::OperationType, NetworkError::ErrorType, std::string mailbox) | |
Constructor. More... | |
std::string | getMailbox () |
Returns the mailbox name on which the error occurred. More... | |
bool | isTimeout () |
Returns whether the network error was a timeout. More... | |
std::string | toString () |
Get the human-readable failure message. More... | |
bool | whileReceiving () |
Returns whether the network error occurred while receiving. More... | |
bool | whileSending () |
Returns whether the network error occurred while sending. More... | |
Detailed Description
A "network error (or endpoint is down)" failure cause.
Constructor & Destructor Documentation
◆ NetworkError()
wrench::NetworkError::NetworkError | ( | NetworkError::OperationType | operation_type, |
NetworkError::ErrorType | error_type, | ||
std::string | mailbox | ||
) |
Constructor.
- Parameters
-
operation_type NetworkError:OperationType::SENDING or NetworkError::OperationType::RECEIVING or NetworkError::OperationType::UNKNOWN error_type the error type mailbox the name of a mailbox (or "" if unknown)
Member Function Documentation
◆ getMailbox()
std::string wrench::NetworkError::getMailbox | ( | ) |
Returns the mailbox name on which the error occurred.
- Returns
- the mailbox name
◆ isTimeout()
bool wrench::NetworkError::isTimeout | ( | ) |
Returns whether the network error was a timeout.
- Returns
- true or false
◆ toString()
|
virtual |
◆ whileReceiving()
bool wrench::NetworkError::whileReceiving | ( | ) |
Returns whether the network error occurred while receiving.
- Returns
- true or false
◆ whileSending()
bool wrench::NetworkError::whileSending | ( | ) |
Returns whether the network error occurred while sending.
- Returns
- true or false
The documentation for this class was generated from the following files:
- NetworkError.h
- NetworkError.cpp