mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
Use DebugInfo functions in CFileHelpers::cp / lua cp
Origin commit data
------------------
Commit: de07369d68
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-09-04 (Sun, 04 Sep 2016)
This commit is contained in:
@@ -106,7 +106,17 @@ int CLuaInstFileHelpers::FileHelpersCp(lua_State *L)
|
||||
|
||||
bool ret = false;
|
||||
CFileHelpers fh;
|
||||
fh.setConsoleQuiet(true);
|
||||
ret = fh.cp(from, to, flags);
|
||||
if (ret == false) {
|
||||
helpersDebugInfo di;
|
||||
fh.readDebugInfo(&di);
|
||||
lua_Debug ar;
|
||||
lua_getstack(L, 1, &ar);
|
||||
lua_getinfo(L, "Sl", &ar);
|
||||
printf(">>> Lua script error [%s:%d] %s\n (error from neutrino: [%s:%d])\n",
|
||||
ar.short_src, ar.currentline, di.msg.c_str(), di.file.c_str(), di.line);
|
||||
}
|
||||
|
||||
lua_pushboolean(L, ret);
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user