Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename simgrid::exception into simgrid::Exception
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 25 Aug 2018 08:22:28 +0000 (10:22 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 25 Aug 2018 08:42:42 +0000 (10:42 +0200)
Also move simgrid/exception.hpp to simgrid/Exception.hpp (our coding
standards say that files defining a class must have their name
upper-cased as the class)

34 files changed:
include/simgrid/Exception.hpp [moved from include/simgrid/exception.hpp with 77% similarity]
include/simgrid/s4u.hpp
src/bindings/java/JavaContext.cpp
src/bindings/java/jmsg.cpp
src/bindings/java/jmsg_process.cpp
src/bindings/java/jmsg_synchro.cpp
src/bindings/java/jmsg_synchro.h
src/bindings/java/jmsg_vm.cpp
src/kernel/activity/ConditionVariableImpl.cpp
src/kernel/activity/SleepImpl.cpp
src/msg/msg_gos.cpp
src/msg/msg_synchro.cpp
src/plugins/vm/VmLiveMigration.cpp
src/simix/ActorImpl.cpp
src/simix/smx_deployment.cpp
src/simix/smx_environment.cpp
src/simix/smx_host.cpp
src/simix/smx_io.cpp
src/simix/smx_network.cpp
src/smpi/mpi/smpi_info.cpp
src/smpi/mpi/smpi_request.cpp
src/xbt/config.cpp
src/xbt/cunit.cpp
src/xbt/dict.cpp
src/xbt/dynar.cpp
src/xbt/exception.cpp
src/xbt/xbt_os_synchro.cpp
src/xbt/xbt_replay.cpp
src/xbt/xbt_str.cpp
teshsuite/msg/host_on_off_processes/host_on_off_processes.cpp
teshsuite/msg/task_destroy_cancel/task_destroy_cancel.cpp
teshsuite/msg/task_progress/task_progress.cpp
teshsuite/xbt/mmalloc/mmalloc_test.cpp
tools/cmake/DefinePackages.cmake

similarity index 77%
rename from include/simgrid/exception.hpp
rename to include/simgrid/Exception.hpp
index f363a2e..66c12de 100644 (file)
@@ -12,7 +12,6 @@
  */
 
 #include <exception>
-#include <simgrid/exception.hpp>
 #include <stdexcept>
 #include <xbt/exception.hpp>
 
 namespace simgrid {
 
 /** Ancestor class of all SimGrid exception */
-class exception : public std::runtime_error {
+class Exception : public std::runtime_error {
 public:
-  exception() : std::runtime_error("") {}
-  exception(const char* message) : std::runtime_error(message) {}
+  Exception() : std::runtime_error("") {}
+  Exception(const char* message) : std::runtime_error(message) {}
 };
 
 /** Exception raised when a timeout elapsed */
-class timeout_error : public simgrid::exception {
+class timeout_error : public simgrid::Exception {
 };
 
 /** Exception raised when an host fails */
-class host_failure : public simgrid::exception {
+class host_failure : public simgrid::Exception {
 };
 
 /** Exception raised when a communication fails because of the network */
-class network_failure : public simgrid::exception {
+class network_failure : public simgrid::Exception {
 };
 
 /** Exception raised when something got canceled before completion */
-class canceled_error : public simgrid::exception {
+class canceled_error : public simgrid::Exception {
 };
 
 } // namespace simgrid
@@ -58,9 +57,9 @@ class canceled_error : public simgrid::exception {
  *
  *  @ingroup XBT_ex_c
  */
-class XBT_PUBLIC xbt_ex : public simgrid::exception, public simgrid::xbt::ContextedException {
+class XBT_PUBLIC xbt_ex : public simgrid::Exception, public simgrid::xbt::ContextedException {
 public:
-  xbt_ex() : simgrid::exception() {}
+  xbt_ex() : simgrid::Exception() {}
 
   /**
    *
@@ -68,7 +67,7 @@ public:
    * @param message    Exception message
    */
   xbt_ex(simgrid::xbt::ThrowPoint throwpoint, const char* message)
-      : simgrid::exception(message), simgrid::xbt::ContextedException(throwpoint, simgrid::xbt::backtrace())
+      : simgrid::Exception(message), simgrid::xbt::ContextedException(throwpoint, simgrid::xbt::backtrace())
   {
   }
 
index 42a72bf..485ed2d 100644 (file)
@@ -20,6 +20,6 @@
 #include <simgrid/s4u/NetZone.hpp>
 #include <simgrid/s4u/Storage.hpp>
 
-#include <simgrid/exception.hpp>
+#include <simgrid/Exception.hpp>
 
 #endif /* SIMGRID_S4U_S4U_H */
index 3cf2422..70c7069 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "JavaContext.hpp"
 #include "jxbt_utilities.hpp"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "src/simix/smx_private.hpp"
 
 #include <functional>
index a6db169..bb621d8 100644 (file)
@@ -9,6 +9,7 @@
 #include <clocale>
 #include <string>
 
+#include "simgrid/Exception.hpp"
 #include "simgrid/msg.h"
 #include "simgrid/plugins/energy.h"
 #include "simgrid/plugins/file_system.h"
@@ -29,7 +30,6 @@
 
 #include "JavaContext.hpp"
 
-#include "simgrid/exception.hpp"
 
 /* Shut up some errors in eclipse online compiler. I wish such a pimple wouldn't be needed */
 #ifndef JNIEXPORT
index fc5444c..f914fc8 100644 (file)
@@ -5,14 +5,13 @@
 /* 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 "jmsg_process.h"
 
 #include "JavaContext.hpp"
 #include "jmsg.hpp"
 #include "jmsg_host.h"
 #include "jxbt_utilities.hpp"
+#include "simgrid/Exception.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
 
index b8afdec..e79910c 100644 (file)
@@ -5,11 +5,10 @@
 /* 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 "jmsg.hpp"
 #include "jmsg_synchro.h"
+#include "jmsg.hpp"
 #include "jxbt_utilities.hpp"
+#include "simgrid/Exception.hpp"
 #include "xbt/synchro.h"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(java);
index 7eb0812..16bff65 100644 (file)
@@ -8,6 +8,7 @@
 #ifndef MSG_JSYNCHRO_H
 #define MSG_JSYNCHRO_H
 
+#include "xbt/base.h"
 #include <jni.h>
 
 SG_BEGIN_DECL()
index fb3bfbb..9b04afb 100644 (file)
@@ -8,7 +8,7 @@
 #include "jmsg_vm.h"
 #include "jmsg_host.h"
 #include "jxbt_utilities.hpp"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "simgrid/plugins/live_migration.h"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
 
index 20412aa..12f2e02 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/kernel/activity/ConditionVariableImpl.hpp"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "src/kernel/activity/MutexImpl.hpp"
 #include "src/kernel/activity/SynchroRaw.hpp"
 #include "src/simix/smx_synchro_private.hpp"
index 38d4cb3..4d807cc 100644 (file)
@@ -9,7 +9,7 @@
 #include "src/kernel/activity/SleepImpl.hpp"
 #include "src/kernel/context/Context.hpp"
 
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "src/simix/ActorImpl.hpp"
 #include "src/simix/popping_private.hpp"
 #include "src/simix/smx_private.hpp"
index b32a3a6..9b434b4 100644 (file)
@@ -3,7 +3,7 @@
 /* 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/Exception.hpp"
 
 #include "simgrid/s4u/Mailbox.hpp"
 #include "src/instr/instr_private.hpp"
index 9bd5a7d..c24469b 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "msg_private.hpp"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "src/simix/smx_private.hpp"
 #include "src/simix/smx_synchro_private.hpp"
 #include "xbt/synchro.h"
index a9a3fd6..74a45e8 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/plugins/vm/VmLiveMigration.hpp"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "src/instr/instr_private.hpp"
 #include "src/plugins/vm/VirtualMachineImpl.hpp"
 #include "src/plugins/vm/VmHostExt.hpp"
index f7dad67..2f2b67c 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "mc/mc.h"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "smx_private.hpp"
 #include "src/kernel/activity/CommImpl.hpp"
 #include "src/kernel/activity/ExecImpl.hpp"
index 96f1fb7..b549d91 100644 (file)
@@ -3,11 +3,11 @@
 /* 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/s4u/Host.hpp"
 #include "smx_private.hpp"
 #include "src/surf/xml/platf_private.hpp" // FIXME: KILLME. There must be a better way than mimicking XML here
 #include <simgrid/engine.h>
-#include <simgrid/exception.hpp>
 
 #include <string>
 #include <vector>
index 1537e99..70150a9 100644 (file)
@@ -7,8 +7,8 @@
 #include "src/include/surf/surf.hpp"
 #include "xbt/xbt_os_time.h"
 
+#include <simgrid/Exception.hpp>
 #include <simgrid/engine.h>
-#include <simgrid/exception.hpp>
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_environment, simix, "Logging specific to SIMIX (environment)");
 
index eac34bf..1e90d37 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "mc/mc.h"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "smx_private.hpp"
 #include "src/kernel/activity/CommImpl.hpp"
 #include "src/kernel/activity/ExecImpl.hpp"
index af80dc9..c4e8562 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "mc/mc.h"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "simgrid/s4u/Host.hpp"
 #include "simgrid/s4u/Io.hpp"
 
index fbcea71..c7afaa8 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "mc/mc.h"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "src/kernel/activity/MailboxImpl.hpp"
 #include "src/mc/mc_replay.hpp"
 #include "src/simix/smx_private.hpp"
index 16b8c53..0b64447 100644 (file)
@@ -1,15 +1,13 @@
-/* Copyright (c) 2007-2018. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2007-2018. 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 "smpi_info.hpp"
-#include "simgrid/exception.hpp"
-#include "xbt/sysdep.h"
+#include "simgrid/Exception.hpp"
 
-namespace simgrid{
-namespace smpi{
+namespace simgrid {
+namespace smpi {
 
 Info::Info(Info* info) : map_(info->map_)
 {
index 16b0dd5..ebd900a 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "mc/mc.h"
 #include "private.hpp"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "simgrid/s4u/Exec.hpp"
 #include "smpi_comm.hpp"
 #include "smpi_datatype.hpp"
@@ -21,7 +21,7 @@
 
 #include <algorithm>
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_request, smpi, "Logging specific to SMPI (reques)");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_request, smpi, "Logging specific to SMPI (request)");
 
 static simgrid::config::Flag<double> smpi_iprobe_sleep(
   "smpi/iprobe", "Minimum time to inject inside a call to MPI_Iprobe", 1e-4);
index b69e80f..b31d8fb 100644 (file)
@@ -19,7 +19,7 @@
 #include <typeinfo>
 #include <vector>
 
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "simgrid/sg_config.hpp"
 #include "xbt/dynar.h"
 #include "xbt/log.h"
@@ -719,7 +719,7 @@ int xbt_cfg_get_boolean(const char *key)
 
 #include <string>
 
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "xbt.h"
 #include "xbt/ex.h"
 
index 4a4fd78..a3a625f 100644 (file)
@@ -14,7 +14,7 @@
 #include <string>
 #include <vector>
 
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include <xbt/cunit.h>
 #include <xbt/string.hpp>
 
index 1a6b61e..be4dd59 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "xbt/dict.h"
 #include "dict_private.h"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "src/xbt_modinter.h"
 #include "xbt/ex.h"
 #include "xbt/log.h"
@@ -454,7 +454,7 @@ void xbt_dict_postexit()
 }
 
 #ifdef SIMGRID_TEST
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "src/internal_config.h"
 #include "xbt.h"
 #include "xbt/ex.h"
index e1444f0..c2dd5f0 100644 (file)
@@ -7,7 +7,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "xbt/dynar.h"
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "xbt/ex.h"
 #include "xbt/log.h"
 #include "xbt/misc.h"
index b9503b6..964590f 100644 (file)
@@ -13,7 +13,7 @@
 #include <memory>
 #include <mutex>
 
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include <xbt/backtrace.hpp>
 #include <xbt/config.hpp>
 #include <xbt/log.h>
index d1d8b0a..d8544dc 100644 (file)
@@ -6,7 +6,7 @@
 /* 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/Exception.hpp"
 #include "simgrid/simix.h" /* used implementation */
 #include "src/kernel/activity/ConditionVariableImpl.hpp"
 #include "xbt/synchro.h"
index 3a876d0..7ee6981 100644 (file)
@@ -3,7 +3,7 @@
 /* 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/Exception.hpp"
 #include "xbt/log.h"
 #include "xbt/replay.hpp"
 
index b530055..bd39729 100644 (file)
@@ -5,10 +5,9 @@
 /* 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/Exception.hpp"
 #include "xbt/misc.h"
 #include "xbt/str.h" /* headers of these functions */
-#include "xbt/sysdep.h"
 
 /** @brief Splits a string into a dynar of strings
  *
@@ -263,7 +262,7 @@ double xbt_str_parse_double(const char* str, const char* error_msg)
 }
 
 #ifdef SIMGRID_TEST
-#include "simgrid/exception.hpp"
+#include "simgrid/Exception.hpp"
 #include "xbt/str.h"
 
 XBT_TEST_SUITE("xbt_str", "String Handling");
index 278c103..fb7751d 100644 (file)
@@ -3,7 +3,7 @@
 /* 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/Exception.hpp"
 #include "simgrid/msg.h"
 
 #include <stdio.h> /* sscanf */
index a7659a9..54f8831 100644 (file)
@@ -3,7 +3,7 @@
 /* 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/Exception.hpp"
 #include "simgrid/msg.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
index 0596850..841fb3d 100644 (file)
@@ -3,7 +3,7 @@
 /* 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/Exception.hpp"
 #include "simgrid/msg.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
index e05d3ff..1d2eeae 100644 (file)
@@ -3,8 +3,10 @@
 /* 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 "xbt/mmalloc.h"
+#include "simgrid/Exception.hpp"
 #include "xbt.h"
+#include "xbt/mmalloc.h"
+
 #include <cassert>
 #include <cstdio>
 #include <cstdlib>
@@ -13,8 +15,6 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
-#include <simgrid/exception.hpp>
-
 XBT_LOG_NEW_DEFAULT_CATEGORY(test,"this test");
 
 #define BUFFSIZE 204800
index d674ddc..7467088 100644 (file)
@@ -669,7 +669,7 @@ set(headers_to_install
   include/simgrid/actor.h
   include/simgrid/barrier.h
   include/simgrid/engine.h
-  include/simgrid/exception.hpp
+  include/simgrid/Exception.hpp
   include/simgrid/chrono.hpp
   include/simgrid/plugins/dvfs.h
   include/simgrid/plugins/energy.h