Skip to content

Fix strict mode losing effect errors that are not strings - #104

Merged
centau merged 2 commits into
centau:mainfrom
kaan650:fix-strict-non-string-error
Oct 22, 2026
Merged

centau merged 2 commits into
centau:mainfrom
kaan650:fix-strict-non-string-error

Conversation

@kaan650

@kaan650 kaan650 commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

In strict mode the error handler for effects passes the error to string.find(), so an error that isn't a string makes the handler itself error and the original error is lost:

vide.strict = true

effect(function()
    error({ code = 1 })
end)
-- effect error stacktrace
-- error in error handling

This converts the error with tostring() first, like effect_traceback() does in non-strict mode.

@centau
centau merged commit 139c873 into centau:main Oct 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants