+ | None -> GENERIC_ERROR "Mysql.Connection_error"
+ | Some dbd ->
+ match Mysql.errno dbd with
+ | Mysql.No_such_table -> No_such_table
+ | Mysql.Table_exists_error -> Table_exists_error
+ | Mysql.Dup_keyname -> Dup_keyname
+ | Mysql.No_such_index -> No_such_index
+ | Mysql.Bad_table_error -> Bad_table_error
+ | _ -> GENERIC_ERROR "Mysql_generic_error"
+;;