This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Licensed under the MIT License, Copyright (c) 2024 jack.ink | |
local function resume_with_error_check(thread: thread, ...: any): () | |
local success, message = coroutine.resume(thread, ...) | |
if not success then | |
print(string.char(27) .. "[31m" .. message) | |
end | |
end |