CC: Tweaked

CC: Tweaked

42M Downloads

Errors are tables instead of strings on SC3 test version.

Wojbie opened this issue ยท 5 comments

commented

Minecraft Version

1.19.x

Version

1.102.2 - SC3 version

Details

Reporting it in case whatever test code we are running has some extras.

Errors generated seem to be a table instead of strings:

local ok, err = pcall(parallel.waitForAll,
    function() sleep(10) end,
    function() sleep(1) os.queueEvent("terminate") end
)
if type(err) == "table" then 
    for i,k in pairs(err) do print(i,k) end
    print(err == err.root_cause)
end
print(type(err), err)

CC:T 1.103.1 (fabric and forge tested) result:
obraz

CC:T 1.102.2 - SC3 test version result:
obraz

commented

Sorry I haven't checked but are we still running on the build merged in SwitchCraftCC/SwitchCraft3#36 and if so was it created before 65f6adc was pushed? We might just need to bump to 1.103.1

commented

I'm assuming this has been reported because it was breaking someone's program? Ughr. I was really hoping it wasn't going to happen (people shouldn't be depending on the format of error messages!), but it was always going to be a risk.

This is why we can't have nice things :(.

commented

@Lemmmy Yes, SC is still using 3a51162. Feel free to switch over to trunk again - think I've got all the useful information out of running this version :).

commented

I'm assuming this has been reported because it was breaking someone's program? Ughr. I was really hoping it wasn't going to happen (people shouldn't be depending on the format of error messages!), but it was always going to be a risk.

We received at least two reports from players who noticed that their code to detect terminations via

local ok,err == pcall(something)
if not ok and err == "Terminated" then --stuff

stopped working. Doing tostring(err) == "Terminated" obviously solves this, but unfortunately this is a breaking change :(

commented

This is why we can't have nice things :(.

:(