Update callback.lua

This PR modifies the Callbacks:Execute method to improve error handling when a callback fails.
This commit is contained in:
cjosephdc
2025-07-11 11:54:10 +08:00
committed by GitHub
parent 5e4827f2d4
commit ec092ceba4
@@ -26,9 +26,11 @@ function Callbacks:Execute(cb, ...)
if not success then
print(("[^1ERROR^7] Failed to execute Callback with RequestId: ^5%s^7"):format(self.currentId))
error(errorString)
print("^3Callback Error:^7 " .. tostring(errorString)) -- just log, don't throw
self.currentId = nil
return
end
self.currentId = nil
end