summaryrefslogtreecommitdiff
path: root/script/log.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/log.lua')
-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)