mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test/util: retry(): also decorate non-string error
This commit is contained in:
@@ -306,10 +306,7 @@ local function retry(max, max_ms, fn)
|
||||
end
|
||||
luv.update_time() -- Update cached value of luv.now() (libuv: uv_now()).
|
||||
if (max and tries >= max) or (luv.now() - start_time > timeout) then
|
||||
if type(result) == "string" then
|
||||
result = "\nretry() attempts: "..tostring(tries).."\n"..result
|
||||
end
|
||||
error(result)
|
||||
error("\nretry() attempts: "..tostring(tries).."\n"..tostring(result))
|
||||
end
|
||||
tries = tries + 1
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user