Nicolas Cannasse hace 18 años
padre
commit
eacf8d363e
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7 1
      std/neko/db/Transaction.hx

+ 7 - 1
std/neko/db/Transaction.hx

@@ -56,7 +56,13 @@ class Transaction {
 		Manager.cnx = cnx;
 		Manager.cnx.startTransaction();
 		runMainLoop(mainFun,logError,3);
-		Manager.cnx.commit();
+		try {
+			Manager.cnx.commit();
+		} catch( e : String ) {
+			// sqlite can have errors on commit
+			if( ~/Database is busy/.match(e) )
+				logError(e);
+		}
 		Manager.cnx.close();
 		Manager.cnx = null;
 		Manager.cleanup();