From bcf47bc67cf3e1c2f410a81e26ceab1bdab06b4a Mon Sep 17 00:00:00 2001 From: kwolekr Date: Wed, 5 Aug 2015 00:49:35 -0400 Subject: Improve Script CPP API diagnostics --- src/script/cpp_api/s_mainmenu.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/script/cpp_api/s_mainmenu.cpp') diff --git a/src/script/cpp_api/s_mainmenu.cpp b/src/script/cpp_api/s_mainmenu.cpp index 7430b0f4f..17ceff082 100644 --- a/src/script/cpp_api/s_mainmenu.cpp +++ b/src/script/cpp_api/s_mainmenu.cpp @@ -55,8 +55,7 @@ void ScriptApiMainMenu::handleMainMenuEvent(std::string text) // Call it lua_pushstring(L, text.c_str()); - if (lua_pcall(L, 1, 0, m_errorhandler)) - scriptError(); + PCALL_RES(lua_pcall(L, 1, 0, m_errorhandler)); } void ScriptApiMainMenu::handleMainMenuButtons(const StringMap &fields) @@ -85,7 +84,6 @@ void ScriptApiMainMenu::handleMainMenuButtons(const StringMap &fields) } // Call it - if (lua_pcall(L, 1, 0, m_errorhandler)) - scriptError(); + PCALL_RES(lua_pcall(L, 1, 0, m_errorhandler)); } -- cgit v1.2.3