From: Arnaud Giersch Date: Tue, 8 Feb 2011 08:48:15 +0000 (+0100) Subject: Throw an exception on error. X-Git-Tag: v0.1~162 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/commitdiff_plain/2c8da5a553c6f0c6cd07dcbfbb8f09d4f5a2f389?ds=inline Throw an exception on error. --- diff --git a/communicator.cpp b/communicator.cpp index 45e43a3..89cece6 100644 --- a/communicator.cpp +++ b/communicator.cpp @@ -209,10 +209,8 @@ int communicator::receiver() receiver1(ctrl_comm, ctrl_task, get_ctrl_mbox()); else if (finished_comm == data_comm) receiver1(data_comm, data_task, get_data_mbox()); - else { - XBT_ERROR("Handling unknown comm -- %p", finished_comm); - MSG_comm_destroy(finished_comm); - } + else + THROW1(0, 0, "Cannot handle unknown comm -- %p", finished_comm); } xbt_dynar_free(&comms); return 0;