From ef9e52300fcfa168f118bfef2a2306be9a653cef Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Mon, 26 Aug 2019 12:38:21 +0200 Subject: [PATCH] crimson/os: drop the old FuturizedStore::Exception class. Signed-off-by: Radoslaw Zarzynski --- src/crimson/os/futurized_store.h | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/crimson/os/futurized_store.h b/src/crimson/os/futurized_store.h index afb448b0506..b7045a7b00e 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; -- 2.39.5