2006-11-11 Don Allingham <don@gramps-project.org>
* src/Config/_GrampsConfigKeys.py: add saving of family editor size * src/Editors/_EditFamily.py: add saving of family editor size * src/DisplayTabs/_GalleryTab.py: Catch possible exception * src/glade/gramps.glade: add saving of family editor size * src/DbLoader.py: Display error message on RUNRECOVERY error * src/DisplayTabs/_AddrEmbedList.py: make labels more consistent (#513) svn: r7616
This commit is contained in:
@ -30,7 +30,7 @@ Handling of loading new/existing databases.
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import os
|
||||
from bsddb.db import DBAccessError
|
||||
from bsddb.db import DBAccessError, DBRunRecoveryError, DBPageNotFoundError
|
||||
from gettext import gettext as _
|
||||
import logging
|
||||
log = logging.getLogger(".")
|
||||
@ -422,7 +422,17 @@ class DbLoader:
|
||||
os.chdir(os.path.dirname(filename))
|
||||
except:
|
||||
print "could not change directory"
|
||||
except DBAccessError, msg:
|
||||
except DBRunRecoveryError, msg:
|
||||
QuestionDialog.ErrorDialog(
|
||||
_("Low level database corruption detected"),
|
||||
_("GRAMPS has detected a problem in the underlying "
|
||||
"Berkeley database. Please exit the program, and GRAMPS "
|
||||
"will attempt to run the recovery repair operation "
|
||||
"the next time you open this database. If this "
|
||||
"problem persists, create a new database, import "
|
||||
"from a backup database, and report the problem to "
|
||||
"gramps-bugs@lists.sourceforge.net."))
|
||||
except (DBAccessError, DBPageNotFoundError), msg:
|
||||
QuestionDialog.ErrorDialog(
|
||||
_("Could not open file: %s") % filename,
|
||||
str(msg[1]))
|
||||
|
Reference in New Issue
Block a user