From e9b4cebcaf4f3e53ef6edb37514e4e989009266b Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 12 Jan 2021 10:10:20 +0100 Subject: [PATCH] Reduce scope for variable (and shadow it by later declarations). --- src/xbt/exception.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/xbt/exception.cpp b/src/xbt/exception.cpp index 58dd0bbf8c..bccfd6d4d3 100644 --- a/src/xbt/exception.cpp +++ b/src/xbt/exception.cpp @@ -89,10 +89,9 @@ static void handler() } // Get the current backtrace and exception - auto e = std::current_exception(); simgrid::xbt::Backtrace bt = simgrid::xbt::Backtrace(); try { - std::rethrow_exception(e); + std::rethrow_exception(std::current_exception()); } // Parse error are handled differently, as the call stack does not matter, only the file location -- 2.20.1