** Raise an error with message 'msg', inserting the name of the ** local variable at position 'level' in the stack. */
| 128 | ** local variable at position 'level' in the stack. |
| 129 | */ |
| 130 | static void varerror (lua_State *L, StkId level, const char *msg) { |
| 131 | int idx = cast_int(level - L->ci->func); |
| 132 | const char *vname = luaG_findlocal(L, L->ci, idx, NULL); |
| 133 | if (vname == NULL) vname = "?"; |
| 134 | luaG_runerror(L, msg, vname); |
| 135 | } |
| 136 | |
| 137 | |
| 138 | /* |
no test coverage detected