mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
minor: fail loudly with stack trace when doShowReader crashed
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user