reapi icon indicating copy to clipboard operation
reapi copied to clipboard

Add new Host_Error hook

Open RauliTop opened this issue 2 years ago • 1 comments

The idea is hook errors to create a log with them. https://github.com/dreamstalker/rehlds/blob/1196646dcfc5e62e4801a08860596476d0e3d77f/rehlds/engine/host.cpp#L108#L139

Well, I don't know if it will work because maybe it's too late and HLDS process is closed. Anyways, can someone test it?

The purpose is something like this: https://amxmodx-es.com/showthread.php?tid=8113

RauliTop avatar Oct 05 '21 08:10 RauliTop

Well, if this is only for logging, ReHLDS already has a CVar "syserror_logfile" to log such errors (in game directory), besides, you can also trying using DLL API's "pfnSys_Error" function for such logging. But having both "<Host|Sys>_Error" functions as a hook in ReHLDS could be useful in order to prevent the server from crashing in some situations where "it could be prevented depending on the kind of error passed". So better to request such hook chain in ReHLDS repository.

StevenKal avatar Oct 08 '21 14:10 StevenKal