From 6944d7097d934a34691b0b2cac60aba196c3339b Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Fri, 27 Jan 2023 09:37:46 -0600 Subject: T4961: add name of offending node in exception Insert_error of string --- src/vytree.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vytree.ml b/src/vytree.ml index a3e2750..cda12f0 100644 --- a/src/vytree.ml +++ b/src/vytree.ml @@ -83,7 +83,8 @@ let rec insert ?(position=Default) ?(children=[]) node path data = let new_node = insert ~position:position ~children:children next_child' names data in replace node new_node | None -> - raise (Insert_error "Path does not exist") + let s = Printf.sprintf "Non-existent intermediary node: \'%s\'" name in + raise (Insert_error s) (** Given a node N check if it has children with duplicate names, and merge subsequent children's children into the first child by -- cgit v1.2.3