for some reason, pcall doesn’t work, and its needed for the error handler that i have
function Weave:Start(): Promise<any>
return Promise.new(function(_, reject)
started = true
for name, mod in loaded do
local method = mod["OnStart"]
if type(method) == "function" then
task.spawn(function()
local suc, er = pcall(function()
debug.setmemorycategory(name)
method(mod)
end)
if not suc then
reject(er)
end
end)
end
end
end)
end
when running, it still shows a normal error (ignore the actual error, i have made it on purpose just to test the handler, and it doesn’t work)
As for the :Start function, it works as shown:
return {OnStart = function()
for _, plr in Players:GetPlayers() do
task.spawn(PlayerAdded, plr)
end
Players.PlayerAdded:Connect(PlayerAdded)
Players.PlayerRemoving:Connect(function(plr)
local profile = Profiles[plr]
if profile ~= nil then
profile:EndSession()
end
end)
end}
I have already disabled debugger enabled, and tried a lot of different things, like not creating a new thread, creating the function inside the pcall (pcall(method, mod)) and it still shows as successful while returning an error
