From: Enrico Tassi Date: Sun, 11 Oct 2009 21:42:23 +0000 (+0000) Subject: can live without library db X-Git-Tag: make_still_working~3344 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=45591fac686d5cf947c250cec5f41a10f464aec6;p=helm.git can live without library db --- diff --git a/helm/software/components/hmysql/hSql.ml b/helm/software/components/hmysql/hSql.ml index 329dd2205..583e082a1 100644 --- a/helm/software/components/hmysql/hSql.ml +++ b/helm/software/components/hmysql/hSql.ml @@ -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 ;;