luainstance: add minimal error reporting

Origin commit data
------------------
Commit: 8dfa4c9bf8
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-03-19 (Tue, 19 Mar 2013)
This commit is contained in:
Stefan Seyfried
2013-03-19 10:23:11 +01:00
committed by Michael Liebmann
parent 77fcde0e75
commit 7e28b9762e

View File

@@ -25,6 +25,7 @@
#include <global.h>
#include <system/settings.h>
#include <gui/widget/msgbox.h>
#include <neutrino.h>
#include "luainstance.h"
@@ -122,7 +123,11 @@ void CLuaInstance::runScript(const char *fileName)
status = lua_pcall(lua, 0, LUA_MULTRET, 0);
if (status)
{
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[] =