Permalink
Browse files

changing function load errors to warnings

  • Loading branch information...
1 parent 3485097 commit 69fd462f3c9f1f961b9599b3f26136d252b949bd @soumith soumith committed Aug 24, 2016
Showing with 2 additions and 2 deletions.
  1. +2 −2 File.lua
View
@@ -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
@@ -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

0 comments on commit 69fd462

Please sign in to comment.