@@ -38,12 +38,12 @@ void Core::EventHandlerCallback()
3838 lua_pushvalue (L, -2 );
3939 if (lua_pcall (L, 1 , 0 , 0 ))
4040 {
41- Core::Debug::LogError (" Core error. Event module error in OnKeyPressed : " + std::string (lua_tostring (L, -1 )));
41+ Core::Debug::LogError (" Core:: Event::OnKeyPressed error: " + std::string (lua_tostring (L, -1 )));
4242 lua_pop (L, 1 );
4343 }
4444 }
4545 else {
46- Core::Debug::LogError (" Core error. Unexpected type for Event.OnKeyPressed:Trigger " );
46+ Core::Debug::LogError (" Core::Event::OnKeyPressed::Trigger error. Unexpected type" );
4747 lua_pop (L, 1 );
4848 }
4949 lua_pop (L, 3 );
@@ -62,12 +62,12 @@ void Core::EventHandlerCallback()
6262 lua_pushvalue (L, -2 );
6363 if (lua_pcall (L, 1 , 0 , 0 ))
6464 {
65- Core::Debug::LogError (" Core error. Event module error in OnKeyDown : " + std::string (lua_tostring (L, -1 )));
65+ Core::Debug::LogError (" Core:: Event::OnKeyDown error: " + std::string (lua_tostring (L, -1 )));
6666 lua_pop (L, 1 );
6767 }
6868 }
6969 else {
70- Core::Debug::LogError (" Core error. Unexpected type for Event.OnKeyDown:Trigger " );
70+ Core::Debug::LogError (" Core::Event::OnKeyDown::Trigger error. Unexpected type" );
7171 lua_pop (L, 1 );
7272 }
7373 lua_pop (L, 3 );
@@ -86,12 +86,12 @@ void Core::EventHandlerCallback()
8686 lua_pushvalue (L, -2 );
8787 if (lua_pcall (L, 1 , 0 , 0 ))
8888 {
89- Core::Debug::LogError (" Core error. Event module error in OnKeyReleased : " + std::string (lua_tostring (L, -1 )));
89+ Core::Debug::LogError (" Core:: Event::OnKeyReleased error: " + std::string (lua_tostring (L, -1 )));
9090 lua_pop (L, 1 );
9191 }
9292 }
9393 else {
94- Core::Debug::LogError (" Core error. Unexpected type for Event.OnKeyReleased:Trigger " );
94+ Core::Debug::LogError (" Core::Event::OnKeyReleased::Trigger error. Unexpected type" );
9595 lua_pop (L, 1 );
9696 }
9797 lua_pop (L, 3 );
@@ -109,7 +109,7 @@ void Core::EventHandlerCallback()
109109 graphicsIsTop.store (true );
110110 if (lua_pcall (L, 2 , 0 , 0 ))
111111 {
112- Core::Debug::LogError (" Core error. Event module error in OnNewFrame(top): " + std::string (lua_tostring (L, -1 )));
112+ Core::Debug::LogError (" Core:: Event:: OnNewFrame(top) error : " + std::string (lua_tostring (L, -1 )));
113113 lua_pop (L, 1 );
114114 }
115115 lua_getfield (L, -1 , " Trigger" );
@@ -118,12 +118,12 @@ void Core::EventHandlerCallback()
118118 graphicsIsTop.store (false );
119119 if (lua_pcall (L, 2 , 0 , 0 ))
120120 {
121- Core::Debug::LogError (" Core error. Event module error in OnNewFrame(bottom): " + std::string (lua_tostring (L, -1 )));
121+ Core::Debug::LogError (" Core:: Event:: OnNewFrame(bottom) error : " + std::string (lua_tostring (L, -1 )));
122122 lua_pop (L, 1 );
123123 }
124124 }
125125 else {
126- Core::Debug::LogError (" Core error. Unexpected type for Event.OnNewFrame:Trigger " );
126+ Core::Debug::LogError (" Core::Event::OnNewFrame::Trigger error. Unexpected type" );
127127 lua_pop (L, 1 );
128128 }
129129 lua_pop (L, 3 );
@@ -204,7 +204,7 @@ static int l_Event_BaseEvent_Trigger(lua_State *L)
204204 if (lua_pcall (L, argc, 0 , errfunc - (argc + 1 ))) {
205205 std::string errMsg (lua_tostring (L, -1 ));
206206 Core::Utils::Replace (errMsg, " \t " , " " );
207- Core::Debug::LogError (errMsg);
207+ Core::Debug::LogError (" Event error: " + errMsg);
208208 lua_pop (L, 1 );
209209 lua_remove (L, errfunc - (argc + 1 ));
210210
@@ -215,7 +215,7 @@ static int l_Event_BaseEvent_Trigger(lua_State *L)
215215 lua_pushvalue (L, listenersIdx);
216216 lua_pushinteger (L, i);
217217 if (lua_pcall (L, 2 , 1 , 0 ))
218- Core::Debug::LogError (CTRPF::Utils::Format (" Core error: %s" , lua_tostring (L, -1 )));
218+ Core::Debug::LogError (CTRPF::Utils::Format (" Core::Event::BaseEvent::Trigger error: %s" , lua_tostring (L, -1 )));
219219 lua_pop (L, 1 ); // Remove either error string or returned value
220220 lua_gc (L, LUA_GCCOLLECT, 0 );
221221 } else {
@@ -296,7 +296,7 @@ bool Core::Game::RegisterEventModule(lua_State *L)
296296 )" ;
297297 if (luaL_dostring (L, lua_Code))
298298 {
299- Core::Debug::LogError (" Core error. Unable to set 'Game. Event.BaseEvent' read-only : " +std::string (lua_tostring (L, -1 )));
299+ Core::Debug::LogError (" Core:: Event::Load error : " +std::string (lua_tostring (L, -1 )));
300300 lua_pop (L, 1 );
301301 return false ;
302302 }
0 commit comments