diff --git a/sdk/core/azure-core/inc/azure/core/datetime.hpp b/sdk/core/azure-core/inc/azure/core/datetime.hpp index 52b35e208..146633324 100644 --- a/sdk/core/azure-core/inc/azure/core/datetime.hpp +++ b/sdk/core/azure-core/inc/azure/core/datetime.hpp @@ -96,7 +96,7 @@ namespace Azure { namespace Core { * @param fractionFormat The format for the fraction part of the Datetime. Only supported by * RFC 3339. * - * @throw std::length_error If year exceeds 9999, or if \p format is not recognized. + * @throw std::invalid_argument If year exceeds 9999, or if \p format is not recognized. */ std::string GetString(DateFormat format, TimeFractionFormat fractionFormat) const; @@ -106,7 +106,7 @@ namespace Azure { namespace Core { * * @param format The representation format to use. * - * @throw std::length_error If year exceeds 9999, or if \p format is not recognized. + * @throw std::invalid_argument If year exceeds 9999, or if \p format is not recognized. */ std::string GetString(DateFormat format) const { @@ -118,8 +118,7 @@ namespace Azure { namespace Core { * * @param fractionFormat The format that is applied to the fraction part from the RFC 3339 date. * - * @throw std::length_error If year exceeds 9999. - * @throw std::invalid_argument If \p format is not recognized. + * @throw std::invalid_argument If year exceeds 9999, or if \p format is not recognized. */ std::string GetRfc3339String(TimeFractionFormat fractionFormat) const {