diff --git a/astrodatagui/AstrodataGUI.py b/astrodatagui/AstrodataGUI.py index c8de854..a490d34 100644 --- a/astrodatagui/AstrodataGUI.py +++ b/astrodatagui/AstrodataGUI.py @@ -3,7 +3,7 @@ import os from .db.StarsDB import StarDB -DB_FILENAME = "stars.db" +DEFAULT_DB = "stars.db" class AstrodataGUI(QtWidgets.QMainWindow): def __init__(self): @@ -17,10 +17,12 @@ class AstrodataGUI(QtWidgets.QMainWindow): def loadDB(self): try: - self.starDB = StarDB.getInstance() - except: + self.starDB = StarDB.getInstance(DEFAULT_DB) + except Exception as e: self.showErrorMessage("DB Connection failed", - f"Could not connect to local database file {DB_FILENAME}") + f"Could not connect to local database file {DEFAULT_DB}\n\ + {e}") def showErrorMessage(self, title: str, msg: str): - return \ No newline at end of file + print(title) + print(msg) \ No newline at end of file