Navigation Menu

Skip to content

Commit

Permalink
[enhance] compiler, database: Enhance error message
Browse files Browse the repository at this point in the history
  • Loading branch information
BourgerieQuentin committed Mar 30, 2012
1 parent 2a857dd commit 49f22b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 2 additions & 3 deletions libqmlcompil/dbGen/schemaGraphLib.ml
@@ -1,5 +1,5 @@
(*
Copyright © 2011 MLstate
Copyright © 2011, 2012 MLstate
This file is part of OPA.
Expand Down Expand Up @@ -172,8 +172,7 @@ let rec find_field_edge t node field =
let multi_key t n =
match List.map E.label (SchemaGraph0.succ_e t n) with
| [{C.label = C.Multi_edge k}] -> k
(* TODO: adapt to sets with multiple keys *)
| _ -> assert false
| _ -> raise Not_found

(** @return the key type of a Mult node *)
let type_of_key t n = match multi_key t n with
Expand Down
6 changes: 5 additions & 1 deletion libqmlcompil/dbGen/schema_private.ml
Expand Up @@ -1015,7 +1015,11 @@ let rec convert_dbpath ~context t gamma node kind path0 path =
let ty =
match SchemaGraphLib.type_of_node node with
| Q.TypeName ([setparam; _], name) when Q.TypeIdent.to_string name = "dbset" -> setparam
| _ -> SchemaGraphLib.type_of_key t node
| _ ->
try
SchemaGraphLib.type_of_key t node
with Not_found ->
cerror "According the path definition, query is invalid"
in
coerce_query_element ~context gamma ty (query, options)
in
Expand Down

0 comments on commit 49f22b3

Please sign in to comment.