diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/service.lua | 5 | ||||
-rw-r--r-- | server/src/utility.lua | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/server/src/service.lua b/server/src/service.lua index 74124ba6..1c2aec9c 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -57,9 +57,6 @@ function mt:_callMethod(name, params) else local ok, r = pcall(table.dump, params) local dump = ok and r or '<Cyclic table>' - if #dump > 10000 then - dump = '<Large table>' - end log.debug(('Task [%s] failed, params: %s'):format( name, dump )) @@ -518,7 +515,7 @@ function mt:doDiagnostics(uri) lines = obj.lines, version = obj.vmVersion, } - local res = self:_callMethod(name, data) + local res = self:_callMethod(name, data) if self:isDeadText(uri) then return end diff --git a/server/src/utility.lua b/server/src/utility.lua index 0817bc03..d7fc9dde 100644 --- a/server/src/utility.lua +++ b/server/src/utility.lua @@ -61,6 +61,10 @@ function table.dump(tbl) lines[#lines+1] = TAB[tab+1] .. '"<Loop>"' return end + if #lines > 10000 then + lines[#lines+1] = TAB[tab+1] .. '"<Large>"' + return + end mark[tbl] = (mark[tbl] or 0) + 1 local keys = {} local keymap = {} |