summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2026-02-24 14:38:17 +0000
committerDaniil Baturin <daniil@baturin.org>2026-02-24 14:38:17 +0000
commit6f09f720e45a6bac9a8459b55977fd58050a4e49 (patch)
tree0412955677ae5ff548b31585e7eefc5b8069dc36 /src
parent3aac2bec0dea9a94c9e9848431400b77f906332e (diff)
downloadvyos-1x-6f09f720e45a6bac9a8459b55977fd58050a4e49.tar.gz
vyos-1x-6f09f720e45a6bac9a8459b55977fd58050a4e49.zip
vyos-op-run: T8306: add error messages for system exceptions
Diffstat (limited to 'src')
-rw-r--r--src/vyos_op_run.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vyos_op_run.ml b/src/vyos_op_run.ml
index 43e9211b9..aa88d42fd 100644
--- a/src/vyos_op_run.ml
+++ b/src/vyos_op_run.ml
@@ -520,6 +520,12 @@ let () =
| Incomplete_command ->
Printf.fprintf stderr "Incomplete command: %s\n" options.vyos_command;
exit 2
+ | Sys_error msg ->
+ Printf.fprintf stderr "System error: %s" msg;
+ exit 255
+ | Unix.Unix_error (err, func, _) ->
+ Printf.fprintf stderr "Failed to execute Unix call %s: %s" func (Unix.error_message err);
+ exit 255
| Internal_error msg ->
Printf.fprintf stderr "Internal error: %s\n" msg;
exit 255