diff --git a/sdk/core/azure-core/src/http/curl/curl.cpp b/sdk/core/azure-core/src/http/curl/curl.cpp index 08517c6d9..210f6c625 100644 --- a/sdk/core/azure-core/src/http/curl/curl.cpp +++ b/sdk/core/azure-core/src/http/curl/curl.cpp @@ -996,7 +996,7 @@ int64_t CurlSession::ResponseBufferParser::Parse( { // Should never happen that parser is not statusLIne or Headers and we still try // to parse more. - throw; + AZURE_UNREACHABLE_CODE(); } // clean internal buffer this->m_internalBuffer.clear(); @@ -1034,7 +1034,7 @@ int64_t CurlSession::ResponseBufferParser::Parse( { // Should never happen that parser is not statusLIne or Headers and we still try // to parse more. - throw; + AZURE_UNREACHABLE_CODE(); } } } diff --git a/sdk/core/azure-core/src/io/body_stream.cpp b/sdk/core/azure-core/src/io/body_stream.cpp index de2f8f292..020d40182 100644 --- a/sdk/core/azure-core/src/io/body_stream.cpp +++ b/sdk/core/azure-core/src/io/body_stream.cpp @@ -130,7 +130,7 @@ FileBodyStream::FileBodyStream(const std::string& filename) m_randomAccessFileBodyStream = std::make_unique<_internal::RandomAccessFileBodyStream>( _internal::RandomAccessFileBodyStream(m_filehandle, 0, fileSize.QuadPart)); } - catch (const std::exception&) + catch (...) { if (fileHandle != INVALID_HANDLE_VALUE) { @@ -156,7 +156,7 @@ FileBodyStream::FileBodyStream(const std::string& filename) m_randomAccessFileBodyStream = std::make_unique<_internal::RandomAccessFileBodyStream>( _internal::RandomAccessFileBodyStream(m_fileDescriptor, 0, fileSize)); } - catch (const std::exception&) + catch (...) { close(m_fileDescriptor); throw; diff --git a/sdk/keyvault/azure-security-keyvault-common/src/sha.cpp b/sdk/keyvault/azure-security-keyvault-common/src/sha.cpp index 308c62cee..f670df0ec 100644 --- a/sdk/keyvault/azure-security-keyvault-common/src/sha.cpp +++ b/sdk/keyvault/azure-security-keyvault-common/src/sha.cpp @@ -88,7 +88,7 @@ public: } default: // imposible to get here - throw; + AZURE_UNREACHABLE_CODE(); } }