Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce scope for variable (and shadow it by later declarations).
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 12 Jan 2021 09:10:20 +0000 (10:10 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 12 Jan 2021 09:10:32 +0000 (10:10 +0100)
src/xbt/exception.cpp

index 58dd0bb..bccfd6d 100644 (file)
@@ -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