]> AND Public Git Repository - simgrid.git/blobdiff - src/instr/instr_paje_trace.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sonar cleanups: pass large objects by const reference
[simgrid.git] / src / instr / instr_paje_trace.cpp
index 601517d19ce53a1e352557fb1debe99cb8baace5..e5fd2dc5930a045aafd23ae9cdd7a87d877b319a 100644 (file)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2010-2019. The SimGrid Team.
+/* Copyright (c) 2010-2020. 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. */
 
+#include "simgrid/Exception.hpp"
 #include "simgrid/sg_config.hpp"
 #include "src/instr/instr_private.hpp"
 #include "src/instr/instr_smpi.hpp"
@@ -30,7 +31,9 @@ void dump_comment_file(const std::string& filename)
   std::ifstream fs(filename.c_str(), std::ifstream::in);
 
   if (fs.fail())
-    THROWF(system_error, 1, "Comment file %s could not be opened for reading.", filename.c_str());
+    throw simgrid::TracingError(
+        XBT_THROW_POINT,
+        simgrid::xbt::string_printf("Comment file %s could not be opened for reading.", filename.c_str()));
 
   while (not fs.eof()) {
     std::string line;