From 80172e17acc7f1f2a1542136d06d79eac71aa2e8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 1 Mar 2021 23:09:20 +0100 Subject: [PATCH] util/Exception: remove redundant std::exception catch clause The "std::nested_exception" catch block already covers this perfectly. --- src/util/Exception.hxx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/util/Exception.hxx b/src/util/Exception.hxx index f36f59f5c..390f5763f 100644 --- a/src/util/Exception.hxx +++ b/src/util/Exception.hxx @@ -95,12 +95,6 @@ FindRetrowNested(std::exception_ptr ep) std::rethrow_exception(ep); } catch (const T &t) { throw; - } catch (const std::exception &e) { - try { - std::rethrow_if_nested(e); - } catch (...) { - FindRetrowNested(std::current_exception()); - } } catch (const std::nested_exception &ne) { FindRetrowNested(ne.nested_ptr()); } catch (...) {