Include new PostgreSQL error handling in CLI
This commit is contained in:
parent
2b42dd258e
commit
95376f9eff
@ -59,7 +59,8 @@ from gramps.gen.db.exceptions import (DbUpgradeRequiredError,
|
|||||||
BsddbUpgradeRequiredError,
|
BsddbUpgradeRequiredError,
|
||||||
BsddbDowngradeRequiredError,
|
BsddbDowngradeRequiredError,
|
||||||
PythonUpgradeRequiredError,
|
PythonUpgradeRequiredError,
|
||||||
PythonDowngradeError)
|
PythonDowngradeError,
|
||||||
|
DbConnectionError)
|
||||||
from gramps.gen.plug import BasePluginManager
|
from gramps.gen.plug import BasePluginManager
|
||||||
from gramps.gen.utils.config import get_researcher
|
from gramps.gen.utils.config import get_researcher
|
||||||
from gramps.gen.recentfiles import recent_files
|
from gramps.gen.recentfiles import recent_files
|
||||||
@ -201,6 +202,9 @@ class CLIDbLoader:
|
|||||||
except DbPythonError as msg:
|
except DbPythonError as msg:
|
||||||
self.dbstate.no_database()
|
self.dbstate.no_database()
|
||||||
self._errordialog(_("Cannot open database"), str(msg))
|
self._errordialog(_("Cannot open database"), str(msg))
|
||||||
|
except DbConnectionError as msg:
|
||||||
|
self.dbstate.no_database()
|
||||||
|
self._errordialog(_("Cannot open database"), str(msg))
|
||||||
except OSError as msg:
|
except OSError as msg:
|
||||||
self.dbstate.no_database()
|
self.dbstate.no_database()
|
||||||
self._errordialog(
|
self._errordialog(
|
||||||
|
Loading…
Reference in New Issue
Block a user