From: Radoslaw Zarzynski Date: Mon, 26 Aug 2019 10:38:21 +0000 (+0200) Subject: crimson/os: drop the old FuturizedStore::Exception class. X-Git-Tag: v15.1.0~801^2~51 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ef9e52300fcfa168f118bfef2a2306be9a653cef;p=ceph.git crimson/os: drop the old FuturizedStore::Exception class. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crimson/os/futurized_store.h b/src/crimson/os/futurized_store.h index afb448b05066..b7045a7b00ec 100644 --- a/src/crimson/os/futurized_store.h +++ b/src/crimson/os/futurized_store.h @@ -26,36 +26,6 @@ class FuturizedCollection; class FuturizedStore { public: - // TODO: replace with the crimson::errorator concept - template - class Exception : public std::logic_error { - public: - using std::logic_error::logic_error; - - // Throwing an exception isn't the sole way to signalize an error - // with it. This approach nicely fits cold, infrequent issues but - // when applied to a hot one (like ENOENT on write path), it will - // likely hurt performance. - // Alternative approach for hot errors is to create exception_ptr - // on our own and place it in the future via make_exception_future. - // When ::handle_exception is called, handler would inspect stored - // exception whether it's hot-or-cold before rethrowing it. - // The main advantage is both types flow through very similar path - // based on future::handle_exception. - static bool is_class_of(const std::exception_ptr& ep) { - // Seastar offers hacks for making throwing lock-less but stack - // unwinding still can be a problem so painful to justify going - // with non-standard, obscure things like this one. - return *ep.__cxa_exception_type() == typeid(ConcreteExceptionT); - } - }; - - struct EnoentException : public Exception { - using Exception::Exception; - }; - struct EnodataException : public Exception { - using Exception::Exception; - }; static std::unique_ptr create(const std::string& type, const std::string& data); FuturizedStore() = default;