So, while I’m still working on my event handler, I’m curious on how to control stack tracing.
Lets say for instance, I have a function that calls another function:
local function a()
error("This shouldn't go past b", 3);
end
local function b()
a();
end
b();
As we know, if the error level is past the stack, then it will not stacktrace it, just like setting the level to 0. So, how do I prevent the stack level from going past b, or in this case, 2?
How does Roblox do this in their Event handler? If you set the level past the :Connect function, it will not stacktrace it.