minor: write reader error to stderr

pull/1900/head
Qingping Hou 8 years ago
parent dceaa01250
commit 2f78493e9e

@ -346,8 +346,8 @@ function ReaderUI:showReader(file)
end)
local ok, err = coroutine.resume(co)
if err ~= nil or ok == false then
print '[!] doShowReader coroutine crashed:'
print(debug.traceback(co, err, 1))
io.stderr:write('[!] doShowReader coroutine crashed:\n')
io.stderr:write(debug.traceback(co, err, 1))
UIManager:quit()
end
end)

@ -40,7 +40,8 @@ function HorizontalGroup:paintTo(bb, x, y)
elseif self.align == "bottom" then
widget:paintTo(bb, x + self._offsets[i].x, y + size.h - self._offsets[i].y)
else
print("[!] invalid alignment for HorizontalGroup", self.align)
io.stderr:write("[!] invalid alignment for HorizontalGroup: ",
self.align)
end
end
end

Loading…
Cancel
Save