summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-06-22 01:32:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-06-22 01:32:19 +0800
commit6dd8b1455a6d70c1520eb9408e5ca7683c11eeb2 (patch)
treeaac61420bc3dac8245380771ce9cc872d6ec6f13 /script
parent830ed2da7277d3ea6f204e63d0f2c51614cdf7d9 (diff)
downloadlua-language-server-6dd8b1455a6d70c1520eb9408e5ca7683c11eeb2.zip
#566 try log middlescript with error
Diffstat (limited to 'script')
-rw-r--r--script/library.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/script/library.lua b/script/library.lua
index a2b400bf..80622f73 100644
--- a/script/library.lua
+++ b/script/library.lua
@@ -170,7 +170,12 @@ local function compileSingleMetaDoc(script, metaLang, status)
util.saveFile((ROOT / 'log' / 'middleScript.lua'):string(), middleScript)
- assert(load(middleScript, middleScript, 't', env))()
+ local suc = xpcall(function ()
+ assert(load(middleScript, middleScript, 't', env))()
+ end, log.error)
+ if not suc then
+ log.debug('MiddleScript:\n', middleScript)
+ end
if disable and status == 'default' then
return nil
end