8#include <aws/core/Core_EXPORTS.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/http/HttpResponse.h>
11#include <aws/core/utils/xml/XmlSerializer.h>
12#include <aws/core/utils/json/JsonSerializer.h>
13#include <aws/core/utils/StringUtils.h>
20 class XmlErrorMarshaller;
21 class JsonErrorMarshaller;
40 template<
typename ERROR_TYPE>
94 template<
typename OTHER_ERROR_TYPE>
109 template<
typename OTHER_ERROR_TYPE>
150 #pragma push_macro("GetMessage")
156#pragma pop_macro("GetMessage")
163 inline void SetMessage(const Aws::String& message) { m_message = message; }
267 s <<
"HTTP response code: " <<
static_cast<int>(e.
GetResponseCode()) <<
"\n"
271 <<
"Error message: " << e.
GetMessage() <<
"\n"
276 s <<
"\n" << header.first <<
" : " << header.second;
void SetRequestId(const Aws::String &requestId)
void SetXmlPayload(const Aws::Utils::Xml::XmlDocument &xmlPayload)
bool ResponseHeaderExists(const Aws::String &headerName) const
Aws::String m_remoteHostIpAddress
ErrorPayloadType m_errorPayloadType
AWSError(const AWSError &)=default
Aws::String m_exceptionName
const Aws::Http::HeaderValueCollection & GetResponseHeaders() const
AWSError(AWSError< OTHER_ERROR_TYPE > &&rhs)
const Aws::String & GetRequestId() const
void SetRemoteHostIpAddress(const Aws::String &remoteHostIpAddress)
Aws::Utils::Xml::XmlDocument m_xmlPayload
Aws::Http::HttpResponseCode m_responseCode
const Aws::String & GetRemoteHostIpAddress() const
AWSError & operator=(AWSError< ERROR_TYPE > &&)=default
const Aws::String & GetMessage() const
AWSError(ERROR_TYPE errorType, bool isRetryable)
RetryableType m_retryableType
void SetResponseHeaders(const Aws::Http::HeaderValueCollection &headers)
ErrorPayloadType GetErrorPayloadType()
const Aws::Utils::Xml::XmlDocument & GetXmlPayload() const
AWSError & operator=(const AWSError< ERROR_TYPE > &)=default
const Aws::String & GetExceptionName() const
void SetResponseCode(Aws::Http::HttpResponseCode responseCode)
Aws::Http::HeaderValueCollection m_responseHeaders
void SetRetryableType(const RetryableType retryableType)
AWSError(ERROR_TYPE errorType, RetryableType retryableType, Aws::String exceptionName="", Aws::String message="")
const Aws::Utils::Json::JsonValue & GetJsonPayload() const
bool ShouldThrottle() const
Aws::Utils::Json::JsonValue m_jsonPayload
void SetExceptionName(const Aws::String &exceptionName)
void SetJsonPayload(Aws::Utils::Json::JsonValue &&jsonPayload)
AWSError(ERROR_TYPE errorType, Aws::String exceptionName, Aws::String message, bool isRetryable)
AWSError(const AWSError< OTHER_ERROR_TYPE > &rhs)
void SetXmlPayload(Aws::Utils::Xml::XmlDocument &&xmlPayload)
Aws::Http::HttpResponseCode GetResponseCode() const
const ERROR_TYPE GetErrorType() const
void SetJsonPayload(const Aws::Utils::Json::JsonValue &jsonPayload)
AWSError(AWSError &&)=default
static Aws::String ToLower(const char *source)
Aws::OStream & operator<<(Aws::OStream &s, const AWSError< T > &e)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream