From 57b78dc0adf802ad71a02855805592b1eb3e1fc3 Mon Sep 17 00:00:00 2001 From: Victor Vazquez Date: Fri, 8 Jan 2021 15:01:19 -0800 Subject: [PATCH] Enhance the exception for body stream rewind (#1291) --- sdk/core/azure-core/inc/azure/core/http/body_stream.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdk/core/azure-core/inc/azure/core/http/body_stream.hpp b/sdk/core/azure-core/inc/azure/core/http/body_stream.hpp index 51c8e3c00..577dd0519 100644 --- a/sdk/core/azure-core/inc/azure/core/http/body_stream.hpp +++ b/sdk/core/azure-core/inc/azure/core/http/body_stream.hpp @@ -68,7 +68,10 @@ namespace Azure { namespace Core { namespace Http { */ virtual void Rewind() { - throw "Not Implemented"; // TODO: Replace with best practice as defined by guideline + // Exception is not meant to be caught. This is rather an indication of a bad program that + // needs to be updated. This is the reason of using `throw` alone. + throw "The upload BodyStream doesn't support Rewind which is required to guarantee fault " + "tolerance when retrying the operation."; }; /**