From 279cecaa6bbafda20ad30b98012a640baf97514c Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Tue, 31 Dec 2013 22:31:08 -0400 Subject: [PATCH] =?UTF-8?q?Improved=20the=20error=20text=20for=20L=C3=96VE?= =?UTF-8?q?=E2=80=99s=20module=20searchers=20(used=20in=20require.)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/filesystem/physfs/wrap_Filesystem.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/filesystem/physfs/wrap_Filesystem.cpp b/src/modules/filesystem/physfs/wrap_Filesystem.cpp index dc1a17c67..bb3bcfb32 100644 --- a/src/modules/filesystem/physfs/wrap_Filesystem.cpp +++ b/src/modules/filesystem/physfs/wrap_Filesystem.cpp @@ -493,7 +493,10 @@ int loader(lua_State *L) } } - lua_pushfstring(L, "\n\tno file \"%s\" in LOVE game directories.\n", (tmp + ".lua").c_str()); + std::string errstr = "\n\tno file '%s' in LOVE game directories."; + errstr += errstr; + + lua_pushfstring(L, errstr.c_str(), (tmp + ".lua").c_str(), (tmp + "/init.lua").c_str()); return 1; } @@ -529,7 +532,7 @@ int extloader(lua_State *L) if (!handle) { - lua_pushfstring(L, "\n\tno extension \"%s\" in LOVE paths.\n", filename); + lua_pushfstring(L, "\n\tno file '%s' in LOVE paths.", tokenized_name.c_str()); return 1; } @@ -540,7 +543,7 @@ int extloader(lua_State *L) if (!func) { SDL_UnloadObject(handle); - lua_pushfstring(L, "\n\textension \"%s\" is incompatible.\n", filename); + lua_pushfstring(L, "\n\tC library '%s' is incompatible.", tokenized_name.c_str()); return 1; }