]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/hmysql/hSql.ml
Bug fixed: in case of (t ...) where t has flexible type, a failure obtained
[helm.git] / helm / software / components / hmysql / hSql.ml
index 329dd2205043bfaf97115f3ea877ae7bc8fe041d..583e082a1c2dd1619c8103e0bdacad9778f73015 100644 (file)
@@ -138,10 +138,13 @@ let mysql_err = function
 
 let errno dbtype dbd =
   wrap 
-    (fun d -> match List.assoc dbtype d with 
-    | Mysql dbd -> mysql_err (HMysql.errno dbd)
-    | Sqlite dbd -> sqlite_err (HSqlite3.errno dbd)
-    | FakeMySql -> assert false)
+    (fun d -> 
+    try
+      match List.assoc dbtype d with 
+      | Mysql dbd -> mysql_err (HMysql.errno dbd)
+      | Sqlite dbd -> sqlite_err (HSqlite3.errno dbd)
+      | FakeMySql -> assert false
+    with Not_found -> OK)
     dbd
 ;;
 
@@ -166,7 +169,10 @@ let escape_string_for_like dbtype dbd =
 
 let isMysql dbtype dbd =
   wrap 
-    (fun d -> match List.assoc dbtype d with Mysql _ -> true | _ -> false) 
+    (fun d -> 
+       try
+        match List.assoc dbtype d with Mysql _ -> true | _ -> false
+       with Not_found -> false) 
     dbd
 ;;