From 031696179b76ed2d887fcb4bcc37bbc22441109b Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Fri, 4 Feb 2022 15:09:39 -0800 Subject: [PATCH] Delegate to RFE string ctor and move impl from header to src. (#3315) * Removing the two param RFE ctor, there should be no callers * Remove the two param RFE ctor from the source file. * Fix-up unit test and add a changelog entry. * Remove test that uses the removed ctor. * Delegate to RFE string ctor and move impl from header to src. --- sdk/core/azure-core/inc/azure/core/exception.hpp | 2 +- sdk/core/azure-core/src/exception.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sdk/core/azure-core/inc/azure/core/exception.hpp b/sdk/core/azure-core/inc/azure/core/exception.hpp index 52d9ab3dd..83b76f834 100644 --- a/sdk/core/azure-core/inc/azure/core/exception.hpp +++ b/sdk/core/azure-core/inc/azure/core/exception.hpp @@ -75,7 +75,7 @@ namespace Azure { namespace Core { * * @param what The explanatory string. */ - explicit RequestFailedException(std::string const& what) : std::runtime_error(what) {} + explicit RequestFailedException(std::string const& what); /** * @brief Constructs a new `%RequestFailedException` object with an HTTP raw response. diff --git a/sdk/core/azure-core/src/exception.cpp b/sdk/core/azure-core/src/exception.cpp index 11fdf3a2c..b29fe600d 100644 --- a/sdk/core/azure-core/src/exception.cpp +++ b/sdk/core/azure-core/src/exception.cpp @@ -15,9 +15,13 @@ using namespace Azure::Core::Http::_internal; namespace Azure { namespace Core { + RequestFailedException::RequestFailedException(std::string const& what) : std::runtime_error(what) + { + } + RequestFailedException::RequestFailedException( std::unique_ptr& rawResponse) - : std::runtime_error("Received an HTTP unsuccessful status code.") + : RequestFailedException("Received an HTTP unsuccessful status code.") { const auto& headers = rawResponse->GetHeaders();