Callback to determine if a Lua error has been fired?

Hey guys I was wondering if it’s possible to determine if an error has been fired on the client or server. If preferable, I’d be detecting some kind of event, or possibly just overriding the function used to print the error text to the console. If this is not possible in Lua, I’m moderately experienced in C++, so I certainly would be open to writing a module, that’s not off the table for me.

The OnLuaError hook is only called in menu state unfortunately. However you can use a module such as gm_luaerror2.

http://www.facepunch.com/showthread.php?t=1252625

Ah, thanks very much. I’ll take a look at this.

[editline]14th May 2014[/editline]

Edit: I feel somewhat silly. Is this module outdated? It was updated only 4 months ago, so that leads me to believe that that is not that case, however, I simply cannot get the module to run. It’s installed on a server hosted by NFO. I’ve put the server .dll in lua/bin but it can’t find the module when I try to require it. Am I doing something wrong?

You could also try using lua_error_url and a web backend, it’ll send a POST request with details about every error on the server, and clients too I believe if its running on a dedicated server.

I actually did get the module to work, you just need to download the more up-to-date version off of github instead of the forum link.