Context:
I have a couple of functions that all return a promise when their ‘phase’ has completed, essentially they’re different sections of an entire game round, I just have them separated in their own functions for ease of editing, my method of putting them all together is the problem though, inside of my startround function, I return this promise
return Promise.new(function(resolve, reject, onCancel)
Intermission():andThen(function()
Voting():andThen(function()
Hiding():andThen(function()
Round():andThen(function()
Escape():andThen(function()
resolve()
end)
end)
end)
end)
end)
end)
It was working fine but now let’s say I want to cancel mid game, where can I catch the promise rejection? How can I just make it cleaner in general?