converted core to new debugging engine

This commit is contained in:
David Anderson 2004-09-15 21:27:35 +00:00
parent d3751054da
commit 1aaf540be4
5 changed files with 7 additions and 12 deletions

View File

@ -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) 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, LogError((*iter).m_Plugin->getAMX(), err, "");
(*iter).m_Plugin->getAMX()->curline, (*iter).m_Plugin->getName());
} }
} }

View File

@ -111,7 +111,6 @@ cell CForward::execute(cell *params, ForwardPreparedArray *preparedArrays)
// log runtime error, if any // log runtime error, if any
if (err != AMX_ERR_NONE) if (err != AMX_ERR_NONE)
LogError(iter->pPlugin->getAMX(), err, ""); 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 // cleanup strings & arrays
for (i = 0; i < m_NumParams; ++i) for (i = 0; i < m_NumParams; ++i)

View File

@ -173,8 +173,7 @@ void LogEventsMngr::executeLogEvents()
if (valid){ if (valid){
if ((err = amx_Exec(a->plugin->getAMX(), NULL , a->func , 0)) != AMX_ERR_NONE) 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\")", LogError(a->plugin->getAMX(), err, "");
err,a->plugin->getAMX()->curline,a->plugin->getName());
} }
#ifdef ENABLEEXEPTIONS #ifdef ENABLEEXEPTIONS

View File

@ -2442,7 +2442,7 @@ static cell AMX_NATIVE_CALL callfunc_end(AMX *amx, cell *params)
// actual call // actual call
if ((err = amx_Execv(plugin->getAMX(), &retVal, func, curParam, gparams)) != AMX_ERR_NONE) 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; return 0;
} }

View File

@ -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) 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\")", LogError((*aa).getPlugin()->getAMX(), err, "");
err,(*aa).getPlugin()->getAMX()->curline,(*aa).getPlugin()->getName());
if ( ret & 2 ) result = MRES_SUPERCEDE; if ( ret & 2 ) result = MRES_SUPERCEDE;
if ( ret & 1 ) RETURN_META(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) 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\")", LogError((*a).getPlugin()->getAMX(), err, "");
err,(*a).getPlugin()->getAMX()->curline,(*a).getPlugin()->getName());
if ( ret & 2 ) result = MRES_SUPERCEDE; if ( ret & 2 ) result = MRES_SUPERCEDE;
if ( ret & 1 ) RETURN_META(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) 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; ++a;