- INFO1("Sending task %p",tk);
- int res = MSG_task_send(tk,RSTRING(mailbox)->ptr);
- if(res != MSG_OK)
- rb_raise(rb_eRuntimeError,"MSG_task_send failed");
+ DEBUG1("Sending task %p",tk);
+ rv = MSG_task_send(tk,RSTRING(mailbox)->ptr);
+ if(rv != MSG_OK)
+ {
+ if (rv == MSG_TRANSFER_FAILURE )
+ rb_raise(rb_eRuntimeError,"Transfer failure while Sending");
+ else if ( rv == MSG_HOST_FAILURE )
+ rb_raise(rb_eRuntimeError,"Host failure while Sending");
+ else if ( rv == MSG_TIMEOUT )
+ rb_raise(rb_eRuntimeError,"Timeout failure while Sending");
+ else
+ rb_raise(rb_eRuntimeError,"MSG_task_send failed");
+ }