src/message.c: Throw a lua error if memory allocation failed