Explorar o código

Add try catch block for dispose_engine()

ogert %!s(int64=4) %!d(string=hai) anos
pai
achega
08e6fecd09
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      cdplib/db_handlers/SQLHandler.py

+ 4 - 1
cdplib/db_handlers/SQLHandler.py

@@ -636,4 +636,7 @@ class SQLHandler:
                             include_tables=include_tables)
 
     def dispose_engine(self):
-        self._engine.dispose()
+        try:
+            self._engine.dispose()
+        except Exception e:
+            self._log.log_and_raise_error(('An error occured when trying to dispose the SQL engine. Error: {}').format(e))