fix: improve error handling

This commit is contained in:
Barrett Ruth 2025-10-05 16:06:08 -04:00
parent 9134a0742b
commit a0b5264761
6 changed files with 33 additions and 26 deletions

View file

@ -11,10 +11,7 @@ local platforms = constants.PLATFORMS
function M.set_platform(platform)
if not vim.tbl_contains(platforms, platform) then
logger.log(
('unknown platform: %s. supported: %s'):format(platform, table.concat(platforms, ', ')),
vim.log.levels.ERROR
)
logger.log(("Unknown platform '%s'"):format(platform), vim.log.levels.ERROR)
return false
end
state.set_platform(platform)