summaryrefslogtreecommitdiff
path: root/src/mongo/util/duration.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/duration.h')
-rw-r--r--src/mongo/util/duration.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/util/duration.h b/src/mongo/util/duration.h
index a040dd38d64..93ab483af89 100644
--- a/src/mongo/util/duration.h
+++ b/src/mongo/util/duration.h
@@ -97,9 +97,9 @@ using HigherPrecisionDuration =
/**
* Casts from one Duration precision to another.
*
- * May throw a UserException if "from" is of lower-precision type and is outside the range of the
- * ToDuration. For example, Seconds::max() cannot be represented as a Milliseconds, and
- * so attempting to cast that value to Milliseconds will throw an exception.
+ * May throw a AssertionException if "from" is of lower-precision type and is outside the range of
+ * the ToDuration. For example, Seconds::max() cannot be represented as a Milliseconds, and so
+ * attempting to cast that value to Milliseconds will throw an exception.
*/
template <typename ToDuration, typename FromPeriod>
ToDuration duration_cast(const Duration<FromPeriod>& from) {
@@ -232,7 +232,7 @@ public:
/**
* Constructs a higher-precision duration from a lower-precision one, as by duration_cast.
*
- * Throws a UserException if "from" is out of the range of this duration type.
+ * Throws a AssertionException if "from" is out of the range of this duration type.
*
* It is a compilation error to attempt a conversion from higher-precision to lower-precision by
* this constructor.