Microsoft Information Protection SDK - C++ 1.17
API Reference Documentation for C++
Loading...
Searching...
No Matches
NetworkError Class Reference

Networking error. Caused by unexpected behavior when making network calls to service endpoints. More...

#include <error.h>

Inheritance diagram for NetworkError:
Error ProxyAuthenticationError

Public Types

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

Public Member Functions

Category GetCategory () const
 Gets the category of network failure.
 
int32_t GetResponseStatusCode () const
 Gets the HTTP response status code.
 
- Public Member Functions inherited from Error
char const * what () const noexcept override
 Get the error message.
 
virtual std::shared_ptr< ErrorClone () const =0
 Clone the error.
 
virtual ErrorType GetErrorType () const
 Get the error type.
 
const std::string & GetErrorName () const
 Get the error name.
 
const std::string & GetMessage (bool maskPII=false) const
 Get the error message.
 
void SetMessage (const std::string &msg)
 Set the error message.
 
void AddDebugInfo (const std::string &key, const std::string &value, bool sensitive=false)
 Add debug info entry.
 
const std::map< std::string, std::string > & GetDebugInfo () const
 Get debug info.
 

Private Member Functions

const std::string & GetCategoryString (Category category) const
 

Private Attributes

Category mCategory
 
int32_t mResponseStatusCode
 

Additional Inherited Members

- Public Attributes inherited from Error
std::string mMessage
 
std::map< std::string, std::string > mDebugInfo
 
std::string mName
 
ErrorType mType
 

Detailed Description

Networking error. Caused by unexpected behavior when making network calls to service endpoints.

Member Enumeration Documentation

◆ Category

enum class NetworkError::Category
strong

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

Member Function Documentation

◆ GetCategory()

Category NetworkError::GetCategory ( ) const
inline

Gets the category of network failure.

Returns
Category of network failure

◆ GetCategoryString()

const std::string & NetworkError::GetCategoryString ( Category category) const
inlineprivate

◆ GetResponseStatusCode()

int32_t NetworkError::GetResponseStatusCode ( ) const
inline

Gets the HTTP response status code.

Returns
HTTP response status code, 0 if none

Member Data Documentation

◆ mCategory

Category NetworkError::mCategory
private

◆ mResponseStatusCode

int32_t NetworkError::mResponseStatusCode
private

The documentation for this class was generated from the following file: