mirror of
https://github.com/gmod-integration/lua.git
synced 2025-04-30 03:15:25 +00:00
25 lines
600 B
Lua
25 lines
600 B
Lua
//
|
|
// Methods
|
|
//
|
|
|
|
function gmInte.sendLuaErrorReport(err, realm, stack, name, id)
|
|
if (name !== "gmod_integration") then return end
|
|
gmInte.http.post("/errors",
|
|
{
|
|
["error"] = err,
|
|
["realm"] = realm,
|
|
["stack"] = stack,
|
|
["name"] = name,
|
|
["id"] = id,
|
|
["identifier"] = SERVER && gmInte.config.id || LocalPlayer():SteamID64()
|
|
}
|
|
)
|
|
end
|
|
|
|
//
|
|
// Hooks
|
|
//
|
|
|
|
hook.Add("OnLuaError", "gmInte:OnLuaError:SendReport", function(err, realm, stack, name, id)
|
|
gmInte.sendLuaErrorReport(err, realm, stack, name, id)
|
|
end) |