mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
luainstance: add minimal error reporting
This commit is contained in:
committed by
M. Liebmann
parent
eefd75537e
commit
8dfa4c9bf8
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
#include <system/settings.h>
|
#include <system/settings.h>
|
||||||
|
#include <gui/widget/msgbox.h>
|
||||||
#include <neutrino.h>
|
#include <neutrino.h>
|
||||||
|
|
||||||
#include "luainstance.h"
|
#include "luainstance.h"
|
||||||
@@ -122,7 +123,11 @@ void CLuaInstance::runScript(const char *fileName)
|
|||||||
|
|
||||||
status = lua_pcall(lua, 0, LUA_MULTRET, 0);
|
status = lua_pcall(lua, 0, LUA_MULTRET, 0);
|
||||||
if (status)
|
if (status)
|
||||||
|
{
|
||||||
fprintf(stderr, "[CLuaInstance::%s] error in script: %s\n", __func__, lua_tostring(lua, -1));
|
fprintf(stderr, "[CLuaInstance::%s] error in script: %s\n", __func__, lua_tostring(lua, -1));
|
||||||
|
ShowMsg2UTF("Lua script error:", lua_tostring(lua, -1), CMsgBox::mbrBack, CMsgBox::mbBack);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const luaL_Reg CLuaInstance::methods[] =
|
const luaL_Reg CLuaInstance::methods[] =
|
||||||
|
Reference in New Issue
Block a user