Semantic token errors are reported as tables and not plain strings. They implement __tostring, so we can use tostring() to obtain human-readable error messages.
Without this change, semantic token errors triggered a traceback from vim.notify (because the input was not a string), and the actual error was not reported to the user.
This change should be backward-compatible, because tostring() is idempotent on strings.
Semantic token errors are reported as tables and not plain strings. They implement
__tostring
, so we can usetostring()
to obtain human-readable error messages.Without this change, semantic token errors triggered a traceback from
vim.notify
(because the input was not a string), and the actual error was not reported to the user.This change should be backward-compatible, because
tostring()
is idempotent on strings.