mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 19:43:09 +00:00
improve error message
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -518,7 +518,7 @@ skynet_send(struct skynet_context * context, uint32_t source, uint32_t destinati
|
||||
|
||||
if (skynet_context_push(destination, &smsg)) {
|
||||
free(data);
|
||||
skynet_error(NULL, "Drop message from %x to %x (size=%d)", source, destination, (int)sz);
|
||||
skynet_error(NULL, "Drop message from %x to %x (type=%d)(size=%d)", source, destination, type, (int)(sz & HANDLE_MASK));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user