diff options
author | John Estabrook <jestabro@vyos.io> | 2023-05-31 18:13:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-31 18:13:30 -0500 |
commit | ddfa989d9d7fab9abb5fb59c927e31d8f00967e5 (patch) | |
tree | 398f9a23c705b8cdeddbf8d447f5e58019d36429 | |
parent | ec930f944a730571cad9e5a2d4108821116a68ba (diff) | |
parent | 664748170e4990cc46b77f44354ea028c2f92f1f (diff) | |
download | libvyosconfig-ddfa989d9d7fab9abb5fb59c927e31d8f00967e5.tar.gz libvyosconfig-ddfa989d9d7fab9abb5fb59c927e31d8f00967e5.zip |
Merge pull request #11 from jestabro/error-passing
T5251: catch error Vytree.Nonexistent_path in delete_value
-rw-r--r-- | lib/bindings.ml | 4 |
1 files changed, 3 insertions, 1 deletions
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 |