improve error message

This commit is contained in:
云风
2012-09-06 20:43:25 +08:00
parent 5efee14582
commit 7b6cd315e1
2 changed files with 3 additions and 1 deletions

View File

@@ -155,6 +155,8 @@ _send(lua_State *L) {
if (dest == 0) {
luaL_error(L, "Invalid name %s", addrname);
}
} else if ('0' <= addrname[0] && addrname[0] <= '9') {
luaL_error(L, "Invalid name %s: must not start with a digit", addrname);
} else {
return _sendname(L, context, addrname);
}