| 661 | |
| 662 | |
| 663 | static int errfile(lua_State *L, const char *what, int fnameindex) { |
| 664 | const char *serr = strerror(errno); |
| 665 | const char *filename = lua_tostring(L, fnameindex) + 1; |
| 666 | lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); |
| 667 | global_glua_chain_api->throw_exception(L, THINKYOUNG_API_SIMPLE_ERROR, luaL_checkstring(L, -1)); |
| 668 | lua_remove(L, fnameindex); |
| 669 | return LUA_ERRFILE; |
| 670 | } |
| 671 | |
| 672 | |
| 673 | static int skipBOM(LoadF *lf) { |
no test coverage detected