优化错误

This commit is contained in:
baidwwy 2021-03-04 17:58:33 +08:00
parent c422bcd643
commit a5efdbc69c
1 changed files with 4 additions and 6 deletions

View File

@ -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