From: Benny Halevy <
bha...@scylladb.com>
Committer: Benny Halevy <
bha...@scylladb.com>
Branch: master
sleep: derive sleep_aborted from abort_requested_exception
sleep_aborted is generated when sleep_abortable is
aborted via an abort_source. Derive it from
the abort_requested_exception base class so that
users of the interface can catch the latter
for generic exception handling for this category of
exceptions.
Signed-off-by: Benny Halevy <
bha...@scylladb.com>
---
diff --git a/include/seastar/core/sleep.hh b/include/seastar/core/sleep.hh
--- a/include/seastar/core/sleep.hh
+++ b/include/seastar/core/sleep.hh
@@ -56,7 +56,7 @@ future<> sleep(std::chrono::duration<Rep, Period> dur) {
}
/// exception that is thrown when application is in process of been stopped
-class sleep_aborted : public std::exception {
+class sleep_aborted : public abort_requested_exception {
public:
/// Reports the exception reason.
virtual const char* what() const noexcept {