rename RequestCancelException to OperationCanceledException (#825)
This commit is contained in:
parent
9d47db1d4a
commit
9c96688b6e
@ -9,6 +9,7 @@
|
||||
|
||||
### New Features
|
||||
- Added `strings.hpp` with `Azure::Core::Strings::LocaleInvariantCaseInsensitiveEqual` and `Azure::Core::Strings::ToLower`.
|
||||
- Added `OperationCanceledException`.
|
||||
|
||||
### Other changes and Improvements
|
||||
|
||||
@ -32,6 +33,7 @@
|
||||
|
||||
- Throw Azure::Http::TransportException if creating new connection fails.
|
||||
- Response objects store Nullable\<T\>.
|
||||
- Calling `Cancel()` from context now throws `OperationCanceledException`.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
||||
@ -26,9 +26,9 @@ namespace Azure { namespace Core {
|
||||
virtual ~ValueBase() {}
|
||||
};
|
||||
|
||||
struct RequestCanceledException : public std::runtime_error
|
||||
struct OperationCanceledException : public std::runtime_error
|
||||
{
|
||||
explicit RequestCanceledException(std::string const& msg) : std::runtime_error(msg) {}
|
||||
explicit OperationCanceledException(std::string const& message) : std::runtime_error(message) {}
|
||||
};
|
||||
|
||||
/**
|
||||
@ -389,7 +389,7 @@ namespace Azure { namespace Core {
|
||||
{
|
||||
if (CancelWhen() < std::chrono::system_clock::now())
|
||||
{
|
||||
throw RequestCanceledException("Request was canceled by context.");
|
||||
throw OperationCanceledException("Request was canceled by context.");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -444,7 +444,7 @@ namespace Azure { namespace Core { namespace Test {
|
||||
= Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Put, host, &stream);
|
||||
|
||||
// Request will be canceled from main thread throwing the exception
|
||||
EXPECT_THROW(pipeline.Send(cancelThis, request), Azure::Core::RequestCanceledException);
|
||||
EXPECT_THROW(pipeline.Send(cancelThis, request), Azure::Core::OperationCanceledException);
|
||||
};
|
||||
|
||||
// Start request
|
||||
@ -467,7 +467,7 @@ namespace Azure { namespace Core { namespace Test {
|
||||
auto request = Azure::Core::Http::Request(Azure::Core::Http::HttpMethod::Get, host);
|
||||
|
||||
// Request will be canceled from main thread throwing the exception
|
||||
EXPECT_THROW(pipeline.Send(cancelThis, request), Azure::Core::RequestCanceledException);
|
||||
EXPECT_THROW(pipeline.Send(cancelThis, request), Azure::Core::OperationCanceledException);
|
||||
};
|
||||
|
||||
// Start request
|
||||
|
||||
Loading…
Reference in New Issue
Block a user