refactor: catch validation error with pcall

This commit is contained in:
Richard 2024-02-29 21:58:04 -08:00
parent d8d0c2a1f8
commit a30293ee3b
4 changed files with 22 additions and 59 deletions

View file

@ -17,7 +17,7 @@ return function()
for key, case in pairs(cases) do
local success, result = pcall(function()
validate(case.value, key, error)
validate(case.value, key)
end)
if case.expected and not success then