minor: fail loudly with stack trace when doShowReader crashed
This commit is contained in:
1 parent
ffd438de18
commit
41240464ca
1 file changed
+6
-1
@@ -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