Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
ProxyAuthenticationError Class Referenceabstract

Proxy authentication failure. More...

#include <src/api/mip/error.h>

+ Inheritance diagram for ProxyAuthenticationError:
+ Collaboration diagram for 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

void AddDebugInfo (const std::string &key, const std::string &value, bool sensitive=false)
 Add debug info entry.
 
virtual std::shared_ptr< ErrorClone () 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.
 

Public Attributes

std::map< std::string, std::string > mDebugInfo
 
std::string mMessage
 
std::string mName
 
ErrorType mType
 

Detailed Description

Proxy authentication failure.

Definition at line 559 of file error.h.

Member Enumeration Documentation

◆ Category

enum class NetworkError::Category
stronginherited

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.

467 {
468 Unknown = 0, /**< Unknown network failure */
469 FailureResponseCode = 1, /**< HTTP response code indicates failure */
470 BadResponse = 2, /**< HTTP response could not be read */
471 UnexpectedResponse = 3, /**< HTTP response completed but contained unexpected data */
472 NoConnection = 4, /**< Failed to establish a connection */
473 Proxy = 5, /**< Proxy failure */
474 SSL = 6, /**< SSL failure */
475 Timeout = 7, /**< Connection timed out */
476 Offline = 8, /**< Operation requires network connectivity */
477 Throttled = 9, /**< HTTP operation failed due to server traffic throttling */
478 Cancelled = 10, /**< HTTP operation has been cancelled by the application */
479 FunctionNotImplemented = 11, /**< HTTP response code indicates called function is not implemented */
480 ServiceUnavailable = 12, /**< HTTP response code indicates service is unavailable */
481 };
@ ServiceUnavailable
HTTP response code indicates service is unavailable.
@ BadResponse
HTTP response could not be read.
@ NoConnection
Failed to establish a connection.
@ Unknown
Unknown network failure.
@ UnexpectedResponse
HTTP response completed but contained unexpected data.
@ Offline
Operation requires network connectivity.
@ Cancelled
HTTP operation has been cancelled by the application.
@ FunctionNotImplemented
HTTP response code indicates called function is not implemented.
@ FailureResponseCode
HTTP response code indicates failure.
@ Timeout
Connection timed out.
@ Throttled
HTTP operation failed due to server traffic throttling.
@ Proxy
Proxy failure.

Member Function Documentation

◆ AddDebugInfo()

void Error::AddDebugInfo ( const std::string & key,
const std::string & value,
bool sensitive = false )
inlineinherited

Add debug info entry.

Parameters
keyDebug info key
valueDebug info value

Definition at line 179 of file error.h.

179 {
180 if (!key.empty() && !value.empty()) {
181 mDebugInfo[key] = value;
182 mFormattedMessage = mFormattedMessage + ", " + key + "=" + value;
183 mMaskedMessage = mMaskedMessage + ", " + key + "=" + (sensitive ? "***" : value);
184 }
185 }
std::map< std::string, std::string > mDebugInfo
Definition error.h:225

References Error::mDebugInfo.

Referenced by DelegateResponseError::DelegateResponseError(), DelegateResponseError::DelegateResponseError(), and DelegateResponseError::DelegateResponseError().

◆ Clone()

virtual std::shared_ptr< Error > Error::Clone ( ) const
pure virtualinherited

Clone the error.

Returns
a clone of the error.

Implemented in JustificationRequiredError.

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

523{ return mCategory; }

◆ GetDebugInfo()

const std::map< std::string, std::string > & Error::GetDebugInfo ( ) const
inlineinherited

Get debug info.

Returns
Debug info (keys/values)

Definition at line 192 of file error.h.

192{ return mDebugInfo; }

References Error::mDebugInfo.

◆ GetErrorName()

const std::string & Error::GetErrorName ( ) const
inlineinherited

Get the error name.

Returns
the error name.

Definition at line 144 of file error.h.

144{ return mName; }
std::string mName
Definition error.h:226

References Error::mName.

◆ GetErrorType()

virtual ErrorType Error::GetErrorType ( ) const
inlinevirtualinherited

Get the error type.

Returns
the error type.

Definition at line 137 of file error.h.

137{ return mType; }
ErrorType mType
Definition error.h:227

References Error::mType.

◆ 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
msgthe error message.

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 }
170 mMessage = msg;
171 }
std::string mMessage
Definition error.h:224

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 }

Member Data Documentation

◆ mDebugInfo

std::map<std::string, std::string> Error::mDebugInfo
inherited

Definition at line 225 of file error.h.

Referenced by Error::AddDebugInfo(), and Error::GetDebugInfo().

◆ mMessage

std::string Error::mMessage
inherited

Definition at line 224 of file error.h.

Referenced by DelegateResponseError::DelegateResponseError(), and Error::SetMessage().

◆ mName

std::string Error::mName
inherited

Definition at line 226 of file error.h.

Referenced by Error::GetErrorName().

◆ mType

ErrorType Error::mType
inherited

Definition at line 227 of file error.h.

Referenced by Error::GetErrorType().


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