优化错误
This commit is contained in:
parent
c422bcd643
commit
a5efdbc69c
|
@ -1,7 +1,7 @@
|
|||
--[[
|
||||
@Author : baidwwy
|
||||
@Date : 2020-09-22 19:49:01
|
||||
@LastEditTime : 2021-02-23 16:03:24
|
||||
@LastEditTime : 2021-03-04 16:42:03
|
||||
--]]
|
||||
io.stdout:setvbuf('no',0)
|
||||
|
||||
|
@ -121,7 +121,8 @@ table.insert(package.searchers, 1, function (path)
|
|||
path = 处理路径(path)
|
||||
path = 搜索路径(path)
|
||||
if path then
|
||||
return assert(load(读取文件(path),path))
|
||||
local r,err = load(读取文件(path),path)
|
||||
return r or error(err,2)
|
||||
end
|
||||
end)
|
||||
|
||||
|
@ -144,8 +145,5 @@ end
|
|||
-- return nil
|
||||
-- end
|
||||
|
||||
local success, res = assert(pcall(require, entry))
|
||||
if not success then
|
||||
error(res,0)
|
||||
end
|
||||
require(entry)
|
||||
return res
|
||||
|
|
Loading…
Reference in New Issue