Commit b9dd0898 authored by bguillaum's avatar bguillaum

Some critical errors become Error.build

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@6809 7838e531-6607-4d57-9587-6c381814729c
parent ba0b3dce
...@@ -70,7 +70,7 @@ module P_graph = struct ...@@ -70,7 +70,7 @@ module P_graph = struct
let edge = P_edge.build ~locals (ast_edge, loc) in let edge = P_edge.build ~locals (ast_edge, loc) in
(match map_add_edge acc i1 edge i2 with (match map_add_edge acc i1 edge i2 with
| Some g -> g | Some g -> g
| None -> Log.fcritical "[GRS] [Graph.build] try to build a graph with twice the same edge %s %s" | None -> Error.build "[GRS] [Graph.build] try to build a graph with twice the same edge %s %s"
(P_edge.to_string edge) (P_edge.to_string edge)
(Loc.to_string loc) (Loc.to_string loc)
) )
...@@ -209,7 +209,7 @@ module G_graph = struct ...@@ -209,7 +209,7 @@ module G_graph = struct
| (ast_node, loc) :: tail -> | (ast_node, loc) :: tail ->
let tail = loop (ast_node.Ast.node_id :: already_bound) tail in let tail = loop (ast_node.Ast.node_id :: already_bound) tail in
if List.mem ast_node.Ast.node_id already_bound if List.mem ast_node.Ast.node_id already_bound
then Log.fcritical "[GRS] [Graph.build] try to build a graph with twice the same node id '%s'" ast_node.Ast.node_id then Error.build "[GRS] [Graph.build] try to build a graph with twice the same node id '%s'" ast_node.Ast.node_id
else G_node.build (ast_node, loc) :: tail in else G_node.build (ast_node, loc) :: tail in
loop [] full_node_list in loop [] full_node_list in
...@@ -230,7 +230,7 @@ module G_graph = struct ...@@ -230,7 +230,7 @@ module G_graph = struct
let edge = G_edge.build ~locals (ast_edge, loc) in let edge = G_edge.build ~locals (ast_edge, loc) in
(match map_add_edge acc i1 edge i2 with (match map_add_edge acc i1 edge i2 with
| Some g -> g | Some g -> g
| None -> Log.fcritical "[GRS] [Graph.build] try to build a graph with twice the same edge %s %s" | None -> Error.build "[GRS] [Graph.build] try to build a graph with twice the same edge %s %s"
(G_edge.to_string edge) (G_edge.to_string edge)
(Loc.to_string loc) (Loc.to_string loc)
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment