summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-21 10:30:23 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-21 10:30:23 +0800
commita13c1293bdababe5b88b8200e4a09dc56948dcc5 (patch)
treeca7faf2cbbea55ab5bff3fd84f68f2fde0bf275e /server
parentb2cfe40d8b28f954a489c22cc029241e458ce036 (diff)
downloadlua-language-server-a13c1293bdababe5b88b8200e4a09dc56948dcc5.zip
直接暴力抛出错误
Diffstat (limited to 'server')
-rw-r--r--server/src/service.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index cb6a20a9..4a5509e7 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -333,7 +333,7 @@ function mt:compileVM(uri)
self:_clearGlobal(uri)
local clock = os.clock()
- local vm = buildVM(ast, self, uri)
+ local vm, err = buildVM(ast, self, uri)
if vm then
CachedVM[vm] = true
end
@@ -368,7 +368,7 @@ function mt:compileVM(uri)
log.debug(('Compile VM[%s] takes: %.3f sec'):format(uri, obj.vmCost))
end
if not obj.vm then
- return nil
+ error(err)
end
self:_compileChain(obj, compiled)