commitlog: mark request_controller_timeout_exception_factory::timeout() noexcept

request_controller_timeout_exception_factory::timeout() creates an
instance of `request_controller_timed_out_error` whose ctor is
default-created by compiler from that of timed_out_error, which is
in turn default-created from the one of `std::exception`. and
`std::exception::exception` does not throw. so it's safe to
mark this factory method `noexcept`.

with this specifier, we don't need to worry about the exception thrown
by it, and don't need to handle them if any in `seastar::semaphore`,
where `timeout()` is called for the customized exception.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #12759
This commit is contained in:
Kefu Chai
2023-02-07 14:51:53 +08:00
committed by Botond Dénes
parent 051da4e148
commit afd1221b53

View File

@@ -242,7 +242,7 @@ public:
return "commitlog: timed out";
}
};
static auto timeout() {
static auto timeout() noexcept {
return request_controller_timed_out_error();
}
};