From a7c4786f15c1eba3c4aeb7b57ee81a52b0c2617c Mon Sep 17 00:00:00 2001 From: ackimixs Date: Sun, 5 May 2024 22:20:37 +0200 Subject: [PATCH] handle crash --- aruco/ArucoDetector.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aruco/ArucoDetector.cpp b/aruco/ArucoDetector.cpp index eaf0fdc..de62d14 100644 --- a/aruco/ArucoDetector.cpp +++ b/aruco/ArucoDetector.cpp @@ -1,5 +1,7 @@ #include "ArucoDetector.h" +#include + ArucoDetector::ArucoDetector(const std::string& calibrationPath, const Team team, const bool headless) : headless(headless), team(team) { // opencv 4.8 @@ -91,7 +93,7 @@ std::pair>>> Ar try { cam->getVideoFrame(frameNotRotated, 1000); - } catch (cv::Exception& e) { + } catch (const std::exception& e) { std::cerr << "Error: " << e.what() << std::endl; std::pair>>> result; result.first = -2;