From 6f09f720e45a6bac9a8459b55977fd58050a4e49 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 24 Feb 2026 14:38:17 +0000 Subject: vyos-op-run: T8306: add error messages for system exceptions --- src/vyos_op_run.ml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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 -- cgit v1.2.3