Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lua/wire/server/wirelib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ function WireLib.TriggerInput(ent, name, value, ...)
input.TriggerLimit = input.TriggerLimit - 1
end

local ok, ret = xpcall(triggerInput, debug.traceback, ent, name, value, ...)
local ok = ProtectedCall(triggerInput, ent, name, value, ...)

if not ok then
local ply = WireLib.GetOwner(ent)
local validPly = IsValid(ply)
local owner_msg = validPly and (" by %s"):format(tostring(ply)) or ""
local message = ("Wire error (%s%s):\n%s\n"):format(tostring(ent), owner_msg, ret)
WireLib.ErrorNoHalt(message)
if validPly then WireLib.ClientError(message, ply) end

if IsValid(ply) then
WireLib.ClientError("Wire error (" .. tostring(ent) .. ")", ply)
end
end
end

Expand Down
Loading