Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more explicit error messages, and random cleanups
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 27 Oct 2007 11:45:21 +0000 (11:45 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 27 Oct 2007 11:45:21 +0000 (11:45 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4909 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/msg/gos.c
src/msg/private.h
src/simix/smx_deployment.c

index ef3c03b..b4ac1d9 100644 (file)
@@ -42,7 +42,7 @@ static MSG_error_t __MSG_task_get_with_time_out_from_host(m_task_t * task,
              && (channel < msg_global->max_channel), "Invalid channel %d",
              channel);
   /* Sanity check */
-  xbt_assert0(task, "Null pointer for the task\n");
+  xbt_assert0(task, "Null pointer for the task storage");
 
   if (*task)
     CRITICAL0
index fcf305e..bdaea3c 100644 (file)
@@ -95,8 +95,8 @@ extern MSG_Global_t msg_global;
 #define MSG_RETURN(val) do {PROCESS_SET_ERRNO(val);return(val);} while(0)
 /* #define CHECK_ERRNO()  ASSERT((PROCESS_GET_ERRNO()!=MSG_HOST_FAILURE),"Host failed, you cannot call this function.") */
 
-#define CHECK_HOST()  xbt_assert0(SIMIX_host_get_state(SIMIX_host_self())==1,\
-                                  "Host failed, you cannot call this function.")
+#define CHECK_HOST()  xbt_assert1(SIMIX_host_get_state(SIMIX_host_self())==1,\
+                                  "Host failed, you cannot call this function. (state=%d)",SIMIX_host_get_state(SIMIX_host_self()))
 
 m_host_t __MSG_host_create(smx_host_t workstation, void *data);
 
index f973d0b..f92d8e3 100644 (file)
@@ -25,8 +25,8 @@ static double kill_time = -1.0;
 static void parse_process_init(void)
 {
   parse_host = xbt_strdup(A_surfxml_process_host);
-  xbt_assert1(SIMIX_host_get_by_name(A_surfxml_process_host),
-             "Unknown host %s", A_surfxml_process_host);
+  xbt_assert1(SIMIX_host_get_by_name(parse_host),
+             "Unknown host %s", parse_host);
   parse_code = SIMIX_get_registered_function(A_surfxml_process_function);
   xbt_assert1(parse_code, "Unknown function %s",
              A_surfxml_process_function);