From 4319b3dd679213d6d51ed775a482c61bf981725c Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Tue, 24 Aug 2021 15:35:52 +0200
Subject: [PATCH] STY: Catching all exceptions in cxxcaosdbcli

---
 src/cxxcaosdbcli.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/cxxcaosdbcli.cpp b/src/cxxcaosdbcli.cpp
index b31f703..bb089f5 100644
--- a/src/cxxcaosdbcli.cpp
+++ b/src/cxxcaosdbcli.cpp
@@ -68,5 +68,11 @@ auto main() -> int {
   } catch (const caosdb::exceptions::ConfigurationError &exc) {
     std::cout << "ConfigurationError: " << exc.what() << std::endl;
     return exc.GetCode();
+  } catch (const std::exception& exc) {
+    std::cout << "Exception: " << exc.what() << std::endl;
+    return 1;
+  } catch (...) {
+    std::cout << "Some other exception." << std::endl;
+    return 2;
   }
 }
-- 
GitLab