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.
This commit is contained in:
Ahson Khan 2022-02-04 15:09:39 -08:00 committed by GitHub
parent 7ae6d82a65
commit 031696179b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

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

View File

@ -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<Azure::Core::Http::RawResponse>& rawResponse)
: std::runtime_error("Received an HTTP unsuccessful status code.")
: RequestFailedException("Received an HTTP unsuccessful status code.")
{
const auto& headers = rawResponse->GetHeaders();