Proxy authentication failure.
More...
#include <src/api/mip/error.h>
|
enum class | Category {
Unknown = 0
, FailureResponseCode = 1
, BadResponse = 2
, UnexpectedResponse = 3
,
NoConnection = 4
, Proxy = 5
, SSL = 6
, Timeout = 7
,
Offline = 8
, Throttled = 9
, Cancelled = 10
, FunctionNotImplemented = 11
,
ServiceUnavailable = 12
} |
| Category of network error. More...
|
|
|
void | AddDebugInfo (const std::string &key, const std::string &value, bool sensitive=false) |
| Add debug info entry.
|
|
virtual std::shared_ptr< Error > | Clone () const =0 |
| Clone the error.
|
|
Category | GetCategory () const |
| Gets the category of network failure.
|
|
const std::map< std::string, std::string > & | GetDebugInfo () const |
| Get debug info.
|
|
const std::string & | GetErrorName () const |
| Get the error name.
|
|
virtual ErrorType | GetErrorType () const |
| Get the error type.
|
|
const std::string & | GetMessage (bool maskPII=false) const |
| Get the error message.
|
|
int32_t | GetResponseStatusCode () const |
| Gets the HTTP response status code.
|
|
void | SetMessage (const std::string &msg) |
| Set the error message.
|
|
char const * | what () const noexcept override |
| Get the error message.
|
|
Proxy authentication failure.
Definition at line 559 of file error.h.
◆ Category
Category of network error.
Enumerator |
---|
Unknown | Unknown network failure
|
FailureResponseCode | HTTP response code indicates failure
|
BadResponse | HTTP response could not be read
|
UnexpectedResponse | HTTP response completed but contained unexpected data
|
NoConnection | Failed to establish a connection
|
Proxy | Proxy failure
|
SSL | SSL failure
|
Timeout | Connection timed out
|
Offline | Operation requires network connectivity
|
Throttled | HTTP operation failed due to server traffic throttling
|
Cancelled | HTTP operation has been cancelled by the application
|
FunctionNotImplemented | HTTP response code indicates called function is not implemented
|
ServiceUnavailable | HTTP response code indicates service is unavailable
|
Definition at line 467 of file error.h.
◆ AddDebugInfo()
void Error::AddDebugInfo |
( |
const std::string & | key, |
|
|
const std::string & | value, |
|
|
bool | sensitive = false ) |
|
inlineinherited |
◆ Clone()
virtual std::shared_ptr< Error > Error::Clone |
( |
| ) |
const |
|
pure virtualinherited |
◆ GetCategory()
Category NetworkError::GetCategory |
( |
| ) |
const |
|
inlineinherited |
Gets the category of network failure.
- Returns
- Category of network failure
Definition at line 523 of file error.h.
◆ GetDebugInfo()
const std::map< std::string, std::string > & Error::GetDebugInfo |
( |
| ) |
const |
|
inlineinherited |
◆ GetErrorName()
const std::string & Error::GetErrorName |
( |
| ) |
const |
|
inlineinherited |
◆ GetErrorType()
virtual ErrorType Error::GetErrorType |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ GetMessage()
const std::string & Error::GetMessage |
( |
bool | maskPII = false | ) |
const |
|
inlineinherited |
Get the error message.
- Returns
- the error message.
Definition at line 151 of file error.h.
151 {
152 return maskPII ? mMaskedMessage : mFormattedMessage;
153 }
◆ GetResponseStatusCode()
int32_t NetworkError::GetResponseStatusCode |
( |
| ) |
const |
|
inlineinherited |
Gets the HTTP response status code.
- Returns
- HTTP response status code, 0 if none
Definition at line 530 of file error.h.
530{ return mResponseStatusCode; }
◆ SetMessage()
void Error::SetMessage |
( |
const std::string & | msg | ) |
|
|
inlineinherited |
Set the error message.
- Parameters
-
Definition at line 160 of file error.h.
160 {
161 std::string* targetStrings[] = { &mFormattedMessage, &mMaskedMessage };
162 for (auto* targetString : targetStrings) {
163 size_t pos = targetString->find(
mMessage);
164 if (pos != std::string::npos) {
165 targetString->replace(pos,
mMessage.length(), msg);
166 } else {
167 targetString->replace(0, 0, msg);
168 }
169 }
171 }
References Error::mMessage.
◆ what()
char const * Error::what |
( |
| ) |
const |
|
inlineoverridenoexceptinherited |
Get the error message.
- Returns
- the error message
Definition at line 121 of file error.h.
121 {
122 return mFormattedMessage.c_str();
123 }
◆ mDebugInfo
std::map<std::string, std::string> Error::mDebugInfo |
|
inherited |
◆ mMessage
std::string Error::mMessage |
|
inherited |
◆ mName
◆ mType
The documentation for this class was generated from the following file: