From 664748170e4990cc46b77f44354ea028c2f92f1f Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 31 May 2023 15:07:22 -0500 Subject: T5251: catch error Vytree.Nonexistent_path in delete_value --- lib/bindings.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/bindings.ml b/lib/bindings.ml index 965d84f..6ab7aeb 100644 --- a/lib/bindings.ml +++ b/lib/bindings.ml @@ -85,7 +85,9 @@ let delete_value c_ptr path value = let new_ct = CT.delete ct path (Some value) in Root.set c_ptr new_ct; 0 (* return 0 *) - with CT.No_such_value -> 1 + with + | Vytree.Nonexistent_path -> 1 + | CT.No_such_value -> 2 let delete_node c_ptr path = let ct = Root.get c_ptr in -- cgit v1.2.3