minor: fail loudly with stack trace when doShowReader crashed

This commit is contained in:
Qingping Hou
2015-12-23 00:01:43 -08:00
parent ffd438de18
commit 41240464ca

View File

@@ -327,7 +327,12 @@ function ReaderUI:showReader(file)
local co = coroutine.create(function()
self:doShowReader(file)
end)
coroutine.resume(co)
local ok, err = coroutine.resume(co)
if err ~= nil then
print '[!] doShowReader coroutine crashed:'
print(debug.traceback(co, err, 1))
UIManager._running = false
end
end)
end