summaryrefslogtreecommitdiff
path: root/src/reference_tree.ml
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-10-24 11:04:39 -0500
committerJohn Estabrook <jestabro@vyos.io>2024-10-24 11:04:39 -0500
commit223652d81e2e373d6aa518bc7215ea9ddf933af0 (patch)
treeb023b5aa728a40c59b48f1c1baf2dc576dc9a06c /src/reference_tree.ml
parentbff171c651592f27ea8e55db99c88f8ab076b0cd (diff)
downloadvyos1x-config-223652d81e2e373d6aa518bc7215ea9ddf933af0.tar.gz
vyos1x-config-223652d81e2e373d6aa518bc7215ea9ddf933af0.zip
T6718: minor changes to support vyconf tests
Diffstat (limited to 'src/reference_tree.ml')
-rw-r--r--src/reference_tree.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/reference_tree.ml b/src/reference_tree.ml
index d6249b8..89bf14e 100644
--- a/src/reference_tree.ml
+++ b/src/reference_tree.ml
@@ -74,7 +74,7 @@ let completion_help_type_of_string v s =
| _ -> raise (Bad_interface_definition
(Printf.sprintf "list, path, or script expected, %s found" s))
-(** Find a child node in xml-lite *)
+(** Find a child node in xml-light *)
let find_xml_child name xml =
let find_aux e =
match e with
@@ -113,7 +113,7 @@ let load_completion_help_from_xml d c =
match c with
| Xml.Element (_, _, [Xml.PCData s]) ->
l @ [completion_help_type_of_string (Xml.tag c) s]
- | _ -> raise (Bad_interface_definition "Malformed completion help")
+ | _ -> raise (Bad_interface_definition ("Malformed completion help :" ^ Xml.to_string c))
in Xml.fold aux [] c in
let l = d.completion_help in
let l' = l @ res in
@@ -131,7 +131,7 @@ let load_constraint_from_xml d c =
| Xml.Element ("validator", [("name", n)], _) ->
let cs = (Value_checker.External (n, None)) :: d.constraints in
{d with constraints=cs}
- | _ -> raise (Bad_interface_definition "Malformed constraint")
+ | _ -> raise (Bad_interface_definition ("Malformed constraint: " ^ Xml.to_string c))
in Xml.fold aux d c
let load_constraint_group_from_xml d c =
@@ -146,7 +146,7 @@ let load_constraint_group_from_xml d c =
| Xml.Element ("validator", [("name", n)], _) ->
let cs = (Value_checker.External (n, None)) :: d.constraint_group in
{d with constraint_group=cs}
- | _ -> raise (Bad_interface_definition "Malformed constraint")
+ | _ -> raise (Bad_interface_definition ("Malformed constraint: " ^ Xml.to_string c))
in Xml.fold aux d c
let data_from_xml d x =
@@ -166,7 +166,7 @@ let data_from_xml d x =
{d with priority=Some i}
| Xml.Element ("hidden", _, _) -> {d with hidden=true}
| Xml.Element ("secret", _, _) -> {d with secret=true}
- | _ -> raise (Bad_interface_definition "Malformed property tag")
+ | _ -> raise (Bad_interface_definition ("Malformed property tag: " ^ Xml.to_string x))
in Xml.fold aux d x
let rec insert_from_xml basepath reftree xml =