]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/common: fix from_iso_8601 had no exception define 64208/head
authorwanglinke <wanglinke@cmss.chinamobile.com>
Thu, 26 Jun 2025 09:48:19 +0000 (17:48 +0800)
committerKefu Chai <k.chai@proxmox.com>
Tue, 10 Feb 2026 04:25:16 +0000 (12:25 +0800)
-  from_iso_8601 may actually throw exceptions,
   causing the program to terminate.

Signed-off-by: Wang Linke <wanglinke_yewu@cmss.chinamobile.com>
src/common/iso_8601.cc
src/common/iso_8601.h

index 74c8aeafbe8bf20eea8072e4ef9ef0448e3c1023..9d45fadf510ef1988b79ac920cd23e3bd5f0be05 100644 (file)
@@ -49,7 +49,7 @@ optional<real_time> calculate(const tm& t, uint32_t n = 0) {
 }
 
 optional<real_time> from_iso_8601(const string_view s,
-                                 const bool ws_terminates) noexcept {
+                                 const bool ws_terminates) {
   auto end = s.cend();
   auto read_digit = [end](sriter& c) mutable {
     if (c == end) {
index 430e584ab9447e7d55f5409674c03a16c772bdfc..dcdf324557a42bca9e82b88748844f1eefd04420 100644 (file)
@@ -30,7 +30,7 @@ namespace ceph {
 // If a date is invalid, boost::none is returned.
 
 boost::optional<ceph::real_time> from_iso_8601(
-  std::string_view s, const bool ws_terminates = true) noexcept;
+  std::string_view s, const bool ws_terminates = true);
 
 enum class iso_8601_format {
   Y, YM, YMD, YMDh, YMDhm, YMDhms, YMDhmsn