| 570 | |
| 571 | |
| 572 | void luaG_typeerror (lua_State *L, const TValue *o, const char *op) { |
| 573 | const char *name = NULL; |
| 574 | const char *t = luaT_typenames[ttype(o)]; |
| 575 | const char *kind = (isinstack(L->ci, o)) ? |
| 576 | getobjname(L, L->ci, cast_int(o - L->base), &name) : |
| 577 | NULL; |
| 578 | if (kind) |
| 579 | luaG_runerror(L, "attempt to %s %s " LUA_QS " (a %s value)", |
| 580 | op, kind, name, t); |
| 581 | else |
| 582 | luaG_runerror(L, "attempt to %s a %s value", op, t); |
| 583 | } |
| 584 | |
| 585 | |
| 586 | void luaG_concaterror (lua_State *L, StkId p1, StkId p2) { |
no test coverage detected