From 1aaf540be4644274d4cc31fe5006252cbc44a69f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 15 Sep 2004 21:27:35 +0000 Subject: [PATCH] converted core to new debugging engine --- amxmodx/CEvent.cpp | 3 +-- amxmodx/CForward.cpp | 1 - amxmodx/CLogEvent.cpp | 5 ++--- amxmodx/amxmodx.cpp | 2 +- amxmodx/meta_api.cpp | 8 +++----- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/amxmodx/CEvent.cpp b/amxmodx/CEvent.cpp index 911f25aa..82d02de3 100755 --- a/amxmodx/CEvent.cpp +++ b/amxmodx/CEvent.cpp @@ -419,8 +419,7 @@ void EventsMngr::executeEvents() if ((err = amx_Exec((*iter).m_Plugin->getAMX(), NULL, (*iter).m_Func, 1, m_ParseVault ? m_ParseVault[0].iValue : 0)) != AMX_ERR_NONE) { - AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err, - (*iter).m_Plugin->getAMX()->curline, (*iter).m_Plugin->getName()); + LogError((*iter).m_Plugin->getAMX(), err, ""); } } diff --git a/amxmodx/CForward.cpp b/amxmodx/CForward.cpp index 9b34d8e7..e7c4d7b4 100755 --- a/amxmodx/CForward.cpp +++ b/amxmodx/CForward.cpp @@ -111,7 +111,6 @@ cell CForward::execute(cell *params, ForwardPreparedArray *preparedArrays) // log runtime error, if any if (err != AMX_ERR_NONE) LogError(iter->pPlugin->getAMX(), err, ""); -// AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err, iter->pPlugin->getAMX()->curline, iter->pPlugin->getName()); // cleanup strings & arrays for (i = 0; i < m_NumParams; ++i) diff --git a/amxmodx/CLogEvent.cpp b/amxmodx/CLogEvent.cpp index bda823d3..b2da62aa 100755 --- a/amxmodx/CLogEvent.cpp +++ b/amxmodx/CLogEvent.cpp @@ -173,8 +173,7 @@ void LogEventsMngr::executeLogEvents() if (valid){ if ((err = amx_Exec(a->plugin->getAMX(), NULL , a->func , 0)) != AMX_ERR_NONE) - AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", - err,a->plugin->getAMX()->curline,a->plugin->getName()); + LogError(a->plugin->getAMX(), err, ""); } #ifdef ENABLEEXEPTIONS @@ -248,4 +247,4 @@ LogEventsMngr::CLogEvent *LogEventsMngr::getValidLogEvent( CLogEvent * a ) return a; } return 0; -} \ No newline at end of file +} diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index c6545d99..49596dff 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -2442,7 +2442,7 @@ static cell AMX_NATIVE_CALL callfunc_end(AMX *amx, cell *params) // actual call if ((err = amx_Execv(plugin->getAMX(), &retVal, func, curParam, gparams)) != AMX_ERR_NONE) { - AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", err, curPlugin->getAMX()->curline, curPlugin->getName()); + LogError(amx, err, ""); return 0; } diff --git a/amxmodx/meta_api.cpp b/amxmodx/meta_api.cpp index aaa21ee7..609d5e45 100755 --- a/amxmodx/meta_api.cpp +++ b/amxmodx/meta_api.cpp @@ -639,8 +639,7 @@ void C_ClientCommand( edict_t *pEntity ) { { if ((err =amx_Exec((*aa).getPlugin()->getAMX(), &ret , (*aa).getFunction() , 3, pPlayer->index, (*aa).getFlags(),(*aa).getId() )) != AMX_ERR_NONE) - AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", - err,(*aa).getPlugin()->getAMX()->curline,(*aa).getPlugin()->getName()); + LogError((*aa).getPlugin()->getAMX(), err, ""); if ( ret & 2 ) result = MRES_SUPERCEDE; if ( ret & 1 ) RETURN_META(MRES_SUPERCEDE); @@ -679,8 +678,7 @@ void C_ClientCommand( edict_t *pEntity ) { { if ( ( err = amx_Exec((*a).getPlugin()->getAMX(), &ret ,(*a).getFunction() , 2, pPlayer->index,pressed_key)) != AMX_ERR_NONE) - AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")", - err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName()); + LogError((*a).getPlugin()->getAMX(), err, ""); if ( ret & 2 ) result = MRES_SUPERCEDE; if ( ret & 1 ) RETURN_META(MRES_SUPERCEDE); @@ -885,7 +883,7 @@ void C_MessageEnd_Post(void) { { if ((err = amx_Exec((*a).getPlugin()->getAMX(), NULL , (*a).getFunction() , 1, mPlayerIndex /*g_events.getArgInteger(0)*/ )) != AMX_ERR_NONE) - AMXXLOG_Log("[AMXX] Run time error %d on line %ld (plugin \"%s\")",err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName()); + LogError((*a).getPlugin()->getAMX(), err, ""); ++a;