]> AND Public Git Repository - simgrid.git/blobdiff - examples/s4u/exec-waitfor/s4u-exec-waitfor.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename an example: I'm always looking for a simple comm example, so here it is
[simgrid.git] / examples / s4u / exec-waitfor / s4u-exec-waitfor.cpp
index 6aeccfef755c68e033acce88b06099ea851de811..6867422e6ce2e534085d28c01dfcc90f15a921cc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2019-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -20,7 +20,7 @@ static void worker()
   try {
     exec->wait_for(3);
     XBT_INFO("Execution complete");
-  } catch (simgrid::TimeoutException&) {
+  } catch (const simgrid::TimeoutException&) {
     XBT_INFO("Execution Timeout!");
   }
 
@@ -30,7 +30,7 @@ static void worker()
   try {
     exec->wait_for(6);
     XBT_INFO("Execution complete");
-  } catch (simgrid::TimeoutException&) {
+  } catch (const simgrid::TimeoutException&) {
     XBT_INFO("Execution Timeout!");
   }
 
@@ -50,7 +50,7 @@ static void worker()
   try {
     exec->wait_for(2);
     XBT_INFO("Parallel Execution complete");
-  } catch (simgrid::TimeoutException&) {
+  } catch (const simgrid::TimeoutException&) {
     XBT_INFO("Parallel Execution Timeout!");
   }
 }