Catch exceptions when loading recent files

This commit is contained in:
Nick Hall committed 2018-04-10 17:11:07 +01:00
1 parent e53603a1fc
commit 01ce73fc04
1 file changed
+6 -1
+6 -1
View File
@@ -64,6 +64,7 @@ from gramps.gen.relationship import get_relationship_calculator
from .glade import Glade
from gramps.gen.utils.db import navigation_label
from .widgets.progressdialog import ProgressMonitor, GtkProgressDialog
from .dialog import ErrorDialog
DISABLED = -1
@@ -261,7 +262,11 @@ class RecentDocsMenu:
def load(self, item):
filename = item.get_path()
self.fileopen(filename)
try:
self.fileopen(filename)
except Exception as err:
ErrorDialog(_('Cannot load database'), str(err),
parent=self.uistate.window)
def build(self):
buf = StringIO()