Rename exceptions message parameter to whatArg (#2782)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
parent
d66081c01f
commit
f1ae8a9cdf
@ -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)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user