call_protected = function(f, ...)
local args = {...}
xpcall(
function()
f(unpack(args))
end,
send_errors_to_output)
end