+ const char *errmsg = lua_tostring (cb->lua_state, /* idx = */ -1);
+ if (errmsg == NULL)
+ ERROR ("lua plugin: Calling a read callback failed. "
+ "In addition, retrieving the error message failed.");
+ else
+ ERROR ("lua plugin: Calling a read callback failed: %s", errmsg);
+ lua_pop (cb->lua_state, /* nelems = */ 1); /* -1 = 0 */
+ return (-1);