summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-18 22:02:31 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-18 22:02:31 +0800
commite699faf8b1da8235805b13dc4c6d5a39629c70a6 (patch)
treecdc24cf324003cdde0e8174e3b9a83c36e915fa6 /script
parent1868f1621f15786382b208fa792c8cf78c062c4e (diff)
downloadlua-language-server-e699faf8b1da8235805b13dc4c6d5a39629c70a6.zip
fix runtime error
Diffstat (limited to 'script')
-rw-r--r--script/log.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/script/log.lua b/script/log.lua
index 597bdc4e..6cb865c3 100644
--- a/script/log.lua
+++ b/script/log.lua
@@ -85,7 +85,10 @@ function m.warn(...)
end
function m.error(...)
- return pushLog('error', ...)
+ -- Don't use tail calls,
+ -- Otherwise, the count of `debug.getinfo` will be wrong
+ local msg = pushLog('error', ...)
+ return msg
end
function m.raw(thd, level, msg, source, currentline, clock)