Catch exceptions when loading recent files
This commit is contained in:
parent
e53603a1fc
commit
01ce73fc04
@ -64,6 +64,7 @@ from gramps.gen.relationship import get_relationship_calculator
|
|||||||
from .glade import Glade
|
from .glade import Glade
|
||||||
from gramps.gen.utils.db import navigation_label
|
from gramps.gen.utils.db import navigation_label
|
||||||
from .widgets.progressdialog import ProgressMonitor, GtkProgressDialog
|
from .widgets.progressdialog import ProgressMonitor, GtkProgressDialog
|
||||||
|
from .dialog import ErrorDialog
|
||||||
|
|
||||||
DISABLED = -1
|
DISABLED = -1
|
||||||
|
|
||||||
@ -261,7 +262,11 @@ class RecentDocsMenu:
|
|||||||
|
|
||||||
def load(self, item):
|
def load(self, item):
|
||||||
filename = item.get_path()
|
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):
|
def build(self):
|
||||||
buf = StringIO()
|
buf = StringIO()
|
||||||
|
Loading…
Reference in New Issue
Block a user