garrysmod-issues icon indicating copy to clipboard operation
garrysmod-issues copied to clipboard

Client won't report all details in errors

Open RaphaelIT7 opened this issue 5 months ago • 5 comments

Details

When you have a client error in a callback, like in a timer,
It only networks the error, but it will miss stuff like Timer Failed! [Simple][@LuaCmd (line 1)]

This can cause in some cases for errors to be just like this one [ERROR] attempt to call a userdata value which makes it really hard to fix those.
Maybe throw another error with the timer message.
But at least let OnLuaError know that it was a callback that had an error, and maybe also let the server somehow know.

Steps to reproduce

  1. Start a Server
  2. Run lua_run_cl timer.Simple(1, function() error("a") end)
  3. See that this print is only visible to the client -> Timer Failed! [Simple][@LuaCmd (line 1)]

RaphaelIT7 avatar Sep 04 '24 16:09 RaphaelIT7