const char *value, *error;
if (auth_request_lua_do_var_expand(req, tpl, &value, &error) < 0) {
- return luaL_error(L, error);
+ return luaL_error(L, "%s", error);
} else {
lua_pushstring(L, value);
}
if (value == NULL) {
lua_pushnil(L);
} else if (auth_request_lua_do_var_expand(req, value, &expanded, &error) < 0) {
- return luaL_error(L, error);
+ return luaL_error(L, "%s", error);
} else {
lua_pushstring(L, expanded);
}
i_stream_skip(script->in, script->last_read);
if (i_stream_read_more(script->in, &data, size_r) == -1 &&
script->in->stream_errno != 0) {
- luaL_error(L, t_strdup_printf("read(%s) failed: %s",
- script->filename,
- i_stream_get_error(script->in)));
+ luaL_error(L, "read(%s) failed: %s",
+ script->filename,
+ i_stream_get_error(script->in));
*size_r = 0;
return NULL;
}
if (mailbox_get_status(mbox, items, &status) < 0) {
const char *error = mailbox_get_last_error(mbox, NULL);
return luaL_error(L, "mailbox_get_status(%s, %u) failed: %s",
- mbox, items, error);
+ mailbox_get_vname(mbox), items, error);
}
/* returns a table */
lua_createtable(L, 0, 20);
value = lua_tolstring(L, 3, &value_len);
if (lua_storage_mailbox_attribute_set(mbox, key, value, value_len, &error) < 0)
- return luaL_error(L,
- t_strdup_printf("Cannot set attribute: %s", error));
+ return luaL_error(L, "Cannot set attribute: %s", error);
return 0;
}
const char *error;
if (lua_storage_mailbox_attribute_set(mbox, key, NULL, 0, &error) < 0)
- return luaL_error(L,
- t_strdup_printf("Cannot unset attribute: %s", error));
+ return luaL_error(L, "Cannot unset attribute: %s", error);
return 0;
}