craftos2 icon indicating copy to clipboard operation
craftos2 copied to clipboard

Hardcrash when an error is raised while generating an error

Open SReject opened this issue 9 months ago • 0 comments

Describe the bug if an error is raised while error() is preparing to raise, craftos-ps crashes

To Reproduce Save the following script and run it

local crash = setmetatable({}, {
    __tostring = function ()
        -- error: attempt to apply arithmetic operator to string
        return 'abc' + '123';
    end
});
error(crash);

Expected behavior A graceful termination of execution

Environment (please complete the following information):

  • OS: Windows 10
  • OS Version: 22H2
  • CraftOS-PC Version: v2.8.2
  • Compiled from source? no

SReject avatar May 07 '24 19:05 SReject