Rename exceptions message parameter to whatArg (#2782)

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
Anton Kolesnyk 2021-08-23 18:41:16 -07:00 committed by GitHub
parent d66081c01f
commit f1ae8a9cdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 13 deletions

View File

@ -29,9 +29,9 @@ namespace Azure { namespace Core {
/**
* @brief Constructs an `OperationCancelledException` with message string as the description.
*
* @param message The description for the exception.
* @param whatArg The explanatory string.
*/
explicit OperationCancelledException(std::string const& message) : std::runtime_error(message)
explicit OperationCancelledException(std::string const& whatArg) : std::runtime_error(whatArg)
{
}
};

View File

@ -98,15 +98,15 @@ namespace Azure { namespace Core { namespace Credentials {
* @brief An exception that gets thrown when an authentication error occurs.
*/
class AuthenticationException final : public std::exception {
std::string m_message;
std::string m_whatArg;
public:
/**
* @brief Constructs `%AuthenticationException` with a message string.
*
* @param message Message string.
* @param whatArg The explanatory string.
*/
explicit AuthenticationException(std::string message) : m_message(std::move(message)) {}
explicit AuthenticationException(std::string whatArg) : m_whatArg(std::move(whatArg)) {}
/**
* Gets the explanatory string.
@ -115,6 +115,6 @@ namespace Azure { namespace Core { namespace Credentials {
*
* @return C string with explanatory information.
*/
char const* what() const noexcept override { return m_message.c_str(); }
char const* what() const noexcept override { return m_whatArg.c_str(); }
};
}}} // namespace Azure::Core::Credentials

View File

@ -73,9 +73,9 @@ namespace Azure { namespace Core {
* @note An Exception without an HTTP raw response represents an exception that happened
* before sending the request to the server.
*
* @param message The error description.
* @param whatArg The explanatory string.
*/
explicit RequestFailedException(std::string const& message) : std::runtime_error(message) {}
explicit RequestFailedException(std::string const& whatArg) : std::runtime_error(whatArg) {}
/**
* @brief Constructs a new `%RequestFailedException` object with an HTTP raw response.

View File

@ -61,10 +61,10 @@ namespace Azure { namespace Core { namespace Http {
* @remark The transport policy will throw this error whenever the transport adapter fail to
* perform a request.
*
* @param message The error description.
* @param whatArg The explanatory string.
*/
explicit TransportException(std::string const& message)
: Azure::Core::RequestFailedException(message)
explicit TransportException(std::string const& whatArg)
: Azure::Core::RequestFailedException(whatArg)
{
}
};

View File

@ -21,9 +21,9 @@ namespace Azure { namespace Storage {
/**
* @brief Constructs a #StorageException with a message.
*
* @param message The explanatory string.
* @param whatArg The explanatory string.
*/
explicit StorageException(const std::string& message) : RequestFailedException(message) {}
explicit StorageException(const std::string& whatArg) : RequestFailedException(whatArg) {}
/**
* Some storage-specific information in response body.