From c91a4a09236623447717c4c1533a058cb1654f92 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: Thu, 5 May 2022 09:12:16 +0200
Subject: [PATCH] fix: armem_robot_state/client/common/RobotReader: try-catch
 block

---
 .../client/common/RobotReader.cpp                 | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/source/RobotAPI/libraries/armem_robot_state/client/common/RobotReader.cpp b/source/RobotAPI/libraries/armem_robot_state/client/common/RobotReader.cpp
index 0509f1dc7..f8eaaa643 100644
--- a/source/RobotAPI/libraries/armem_robot_state/client/common/RobotReader.cpp
+++ b/source/RobotAPI/libraries/armem_robot_state/client/common/RobotReader.cpp
@@ -220,13 +220,18 @@ namespace armarx::armem::robot_state
             }
         };
 
-        const auto result = transformReader.lookupTransform(query);
-        if (not result)
-        {
+        try {
+            const auto result = transformReader.lookupTransform(query);
+            if (not result)
+            {
+                return std::nullopt;
+            }
+            return result.transform;
+
+        } catch (...) {
+            ARMARX_WARNING << GetHandledExceptionString();
             return std::nullopt;
         }
-
-        return result.transform;
     }
 
 
-- 
GitLab