From 9bd394f351e480cfa0f88316a89e7f4835566423 Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Fri, 27 Dec 2024 03:09:27 +0800 Subject: [PATCH] Update dashboard.py --- src/dashboard.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dashboard.py b/src/dashboard.py index aa30a07..93c190c 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -1629,10 +1629,12 @@ def sqlSelect(statement: str, paramters: tuple = ()) -> sqlite3.Cursor: try: cursor = sqldb.cursor() return cursor.execute(statement, paramters) - except sqlite3.OperationalError as error: print("[WGDashboard] SQLite Error:" + str(error) + " | Statement: " + statement) return [] + except Exception as e: + print("[WGDashboard] SQLite Error:" + str(error) + " | Statement: " + statement) + return [] def sqlUpdate(statement: str, paramters: tuple = ()) -> sqlite3.Cursor: @@ -1645,6 +1647,9 @@ def sqlUpdate(statement: str, paramters: tuple = ()) -> sqlite3.Cursor: sqldb.commit() except sqlite3.OperationalError as error: print("[WGDashboard] SQLite Error:" + str(error) + " | Statement: " + statement) + except Exception as e: + print("[WGDashboard] SQLite Error:" + str(error) + " | Statement: " + statement) + return [] DashboardConfig = DashboardConfig() _, APP_PREFIX = DashboardConfig.GetConfig("Server", "app_prefix")