| 10283 | |
| 10284 | |
| 10285 | LUALIB_API void luaL_where (lua_State *L, int level) { |
| 10286 | lua_Debug ar; |
| 10287 | if (lua_getstack(L, level, &ar)) { /* check function at level */ |
| 10288 | lua_getinfo(L, "Sl", &ar); /* get info about it */ |
| 10289 | if (ar.currentline > 0) { /* is there info? */ |
| 10290 | lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline); |
| 10291 | return; |
| 10292 | } |
| 10293 | } |
| 10294 | lua_pushliteral(L, ""); /* else, no information available... */ |
| 10295 | } |
| 10296 | |
| 10297 | |
| 10298 | LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) { |
no test coverage detected