From 96b7c92d81e6e50962a854783b6c2e151bbbe7ef Mon Sep 17 00:00:00 2001 From: Steffen Mecke Date: Tue, 31 May 2016 01:48:21 +0200 Subject: [PATCH] fail fast for wrong message parameters simplifies debugging --- src/kernel/messages.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kernel/messages.c b/src/kernel/messages.c index 330c2feeb..ecdc588a8 100644 --- a/src/kernel/messages.c +++ b/src/kernel/messages.c @@ -194,6 +194,7 @@ message *msg_message(const char *name, const char *sig, ...) } else { log_error("invalid parameter %s for message type %s\n", paramname, mtype->name); + assert(!"invalid parameter for message type"); } while (*ic && !isalnum(*ic)) ic++; @@ -201,6 +202,7 @@ message *msg_message(const char *name, const char *sig, ...) va_end(vargs); if (argnum != mtype->nparameters) { log_error("not enough parameters for message type %s\n", mtype->name); + assert(!"not enough parameters for message type"); } return msg_create(mtype, args);