From 534e3652710493662f996bcb3eda2853c57bb85b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A1nos=20Benjamin=20Antal?= <benjamin.antal@memgraph.io>
Date: Wed, 26 Oct 2022 11:22:27 +0200
Subject: [PATCH] Suppress warning about exception escape for destructor

---
 src/query/v2/plan/scoped_profile.hpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/query/v2/plan/scoped_profile.hpp b/src/query/v2/plan/scoped_profile.hpp
index f70701c4c..8dc228606 100644
--- a/src/query/v2/plan/scoped_profile.hpp
+++ b/src/query/v2/plan/scoped_profile.hpp
@@ -32,6 +32,9 @@ class ScopedCustomProfile {
   ScopedCustomProfile &operator=(const ScopedCustomProfile &) = delete;
   ScopedCustomProfile &operator=(ScopedCustomProfile &&) = delete;
 
+  // If an exception is thrown in any of these functions that signals a problem that is much bigger than we could handle
+  // it here, thus we don't attempt to handle it.
+  // NOLINTNEXTLINE(bugprone-exception-escape)
   ~ScopedCustomProfile() {
     if (nullptr != context_->stats_root) {
       auto &custom_data = context_->stats_root->custom_data[custom_data_name_];