Skip to content

Commit

Permalink
Merge pull request #748 from torch/funcload
Browse files Browse the repository at this point in the history
changing function load errors to warnings
  • Loading branch information
soumith authored Aug 27, 2016
2 parents 9b1aeb1 + 69fd462 commit 65255ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions File.lua
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ function File:readObject()
local dumped = self:readChar(size):string()
local func, err = loadstring(dumped)
if not func then
error(string.format('Failed to load function from bytecode: %s', err))
io.stderr:write(string.format('Warning: Failed to load function from bytecode: %s', err))
end
local upvalues = self:readObject()
for index,upvalue in ipairs(upvalues) do
Expand All @@ -298,7 +298,7 @@ function File:readObject()
local dumped = self:readChar(size):string()
local func, err = loadstring(dumped)
if not func then
error(string.format('Failed to load function from bytecode: %s', err))
io.stderr:write(string.format('Warning: Failed to load function from bytecode: %s', err))
end
if not force then
objects[index] = func
Expand Down

0 comments on commit 65255ba

Please sign in to comment.