Ruby: More descriptive message buffer connection fatal
When connecting message buffers between Ruby controllers, it is easy to mistakenly connect multiple controllers to the same message buffer. This patch prints a more descriptive fatal message than the previous assert statement in order to facilitate easier debugging.
This commit is contained in:
parent
19cc9fc6bd
commit
88d34665d0
1 changed files with 5 additions and 1 deletions
|
@ -79,7 +79,11 @@ class MessageBuffer
|
|||
void setPriority(int rank) { m_priority_rank = rank; }
|
||||
void setConsumer(Consumer* consumer)
|
||||
{
|
||||
assert(m_consumer == NULL);
|
||||
if (m_consumer != NULL) {
|
||||
fatal("Trying to connect %s to MessageBuffer %s. \
|
||||
\n%s already connected. Check the cntrl_id's.\n",
|
||||
*consumer, *this, *m_consumer);
|
||||
}
|
||||
m_consumer = consumer;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue