luaL_where

void luaL_where (lua_State *L, int lvl);

Pushes onto the stack a string identifying the current position of the control at level lvl in the call stack. Typically this string has the format <chunkname>:<currentline>:. Level 0 is the running function, level 1 is the function that called the running function, etc.

This function is used to build a prefix for error messages.