mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-12 19:20:29 +00:00
Propagate errors arising from API loading
This commit is contained in:
parent
19e4c03d3a
commit
d766f8b34e
@ -644,14 +644,12 @@ function os.loadAPI( _sPath )
|
||||
if fnAPI then
|
||||
local ok, err = pcall( fnAPI )
|
||||
if not ok then
|
||||
printError( err )
|
||||
tAPIsLoading[sName] = nil
|
||||
return false
|
||||
return error( "Failed to load API " .. sName .. " due to " .. err, 1 )
|
||||
end
|
||||
else
|
||||
printError( err )
|
||||
tAPIsLoading[sName] = nil
|
||||
return false
|
||||
return error( "Failed to load API " .. sName .. " due to " .. err, 1 )
|
||||
end
|
||||
|
||||
local tAPI = {}
|
||||
|
Loading…
Reference in New Issue
Block a user