issue error directly when doc is malformated

This should popup a message saying "No reader engine for this file"
instead of a crash when document file is malformated.

This should fix #868.
This commit is contained in:
chrox
2014-08-29 17:17:08 +08:00
parent 233f847954
commit 2f2d9f1bf7
6 changed files with 23 additions and 17 deletions

View File

@@ -24,7 +24,6 @@ local Document = {
-- flag to show whether the document was opened successfully
is_open = false,
error_message = nil,
-- flag to show that the document needs to be unlocked by a password
is_locked = false,