Skip to content

Commit

Permalink
Merge pull request #490 from zardyh/ComputerCraft/master
Browse files Browse the repository at this point in the history
Propagate errors arising from API loading
  • Loading branch information
SquidDev committed Nov 15, 2017
2 parents 6691ec8 + d766f8b commit 1cf10c5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/resources/assets/computercraft/lua/bios.lua
Original file line number Diff line number Diff line change
Expand Up @@ -609,14 +609,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 = {}
Expand Down

0 comments on commit 1cf10c5

Please sign in to comment.