X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f74123604bf09b2b5c68c5d48def74a2506099ff..4419ab41e208b813ab7ee7005de111fb23049a4f:/src/bindings/ruby/rb_msg_task.c diff --git a/src/bindings/ruby/rb_msg_task.c b/src/bindings/ruby/rb_msg_task.c index d54b5429d4..1d0e7c32f3 100644 --- a/src/bindings/ruby/rb_msg_task.c +++ b/src/bindings/ruby/rb_msg_task.c @@ -60,15 +60,19 @@ static VALUE task_execute(VALUE class,VALUE task) // Sending Task -static VALUE task_send(VALUE class,VALUE task,VALUE mailbox) +static void task_send(VALUE class,VALUE task,VALUE mailbox) { // Wrap Ruby Value to m_task_t struct + m_task_t tk; Data_Get_Struct(task, m_task_t, tk); - return INT2NUM(MSG_task_send(tk,RSTRING(mailbox)->ptr)); - + int res = MSG_task_send(tk,RSTRING(mailbox)->ptr); + + if(res != MSG_OK) + rb_raise(rb_eRuntimeError,"MSG_task_send failed"); + return; } // Recieving Task