mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Changed error output format
This commit is contained in:
parent
3587483fa6
commit
ff5b1dd7cc
@ -1167,8 +1167,12 @@ void GenericError(AMX *amx, int err, int line, char buf[], const char *file)
|
||||
sprintf(buf, "Run time error %d on line %d (%s \"%s\").", err, line, (file?"file":"plugin"), (file?file:g_plugins.findPluginFast(amx)->getName()));
|
||||
} else {
|
||||
if (err == AMX_ERR_NATIVE && amx->userdata[2])
|
||||
{
|
||||
geterr = (char *)(amx->userdata[2]);
|
||||
sprintf(buf, "Run time error %d (%s) on line %d (%s \"%s\").", err, geterr, line, (file?"file":"plugin"), (file?file:g_plugins.findPluginFast(amx)->getName()));
|
||||
sprintf(buf, "Native error in \"%s\" on line %d (%s \"%s\").", geterr, line, (file?"file":"plugin"), (file?file:g_plugins.findPluginFast(amx)->getName()));
|
||||
} else {
|
||||
sprintf(buf, "Run time error %d (%s) on line %d (%s \"%s\").", err, geterr, line, (file?"file":"plugin"), (file?file:g_plugins.findPluginFast(amx)->getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1202,6 +1206,10 @@ void LogError(AMX *amx, int err, const char *fmt, ...)
|
||||
{
|
||||
AMXXLOG_Log("%s", vbuf);
|
||||
}
|
||||
if (!dbg)
|
||||
{
|
||||
AMXXLOG_Log("[AMXX] To enable debug mode, add \" debug\" after the plugin name in plugins.ini (without quotes).");
|
||||
}
|
||||
} else {
|
||||
AMX_TRACE *t = dbg->tail;
|
||||
AMX_DEBUGCALL tracer = (AMX_DEBUGCALL)(amx->userdata[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user