minor: fail loudly with stack trace when doShowReader crashed

pull/1754/head
Qingping Hou 8 years ago
parent ffd438de18
commit 41240464ca

@ -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

Loading…
Cancel
Save