From 84aa0d14b94f17c34fbb2688eecc10d7fe3116e7 Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Mon, 2 Jan 2023 18:02:43 +0100 Subject: [PATCH] main: xvc_server: catch exception --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index cbfd9fa..d3db154 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -415,7 +415,11 @@ int main(int argc, char **argv) /* XVC server */ /* ------------------- */ if (args.xvc) { - return run_xvc_server(args, cable, &pins_config); + try { + return run_xvc_server(args, cable, &pins_config); + } catch (std::exception &e) { + return EXIT_FAILURE; + } } #endif