]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/hmysql/hSqlite3.ml
exception inside regex callback not re-raised if equal to sys.break
[helm.git] / helm / software / components / hmysql / hSqlite3.ml
index b8687c5e9e20e85ce89a3f8a96c06e0508007519..707b482bc4d3cb5f76469324a8233d2495a272e9 100644 (file)
@@ -103,6 +103,7 @@ let quick_connect
     else
       db_name
   in
+  HExtlib.mkdir (Filename.dirname db_to_open);
   let db = Sqlite3.db_open db_to_open in
   (* attach the REGEX function *)
   Sqlite3.create_fun2 db "REGEXP"
@@ -117,7 +118,8 @@ let quick_connect
              else 
                Sqlite3.Data.INT 0L
          | _ -> raise (Error "wrong types to 'REGEXP'")
-        with exn -> HLog.error (Printexc.to_string exn); raise exn);
+        with Sys.Break -> Sqlite3.Data.INT 0L
+          | exn -> HLog.error (Printexc.to_string exn); raise exn);
   Some db
 ;;