Rather than spitting out an error code number that is not particularly
useful. The string contains the line number and the nature of the error,
which is much more useful for debugging or reporting an issue.
llret = luaL_loadbuffer(L, buf, strlen(buf), altfname);
if (llret != LUA_OK) {
- impossible("luaL_loadbuffer: Error loading %s (errcode %i)",
- altfname, llret);
+ impossible("luaL_loadbuffer: Error loading %s: %s",
+ altfname, lua_tostring(L, -1));
ret = FALSE;
goto give_up;
} else {