From a1e5e4abcb378dfb5565c47f9d15267b3ed2b668 Mon Sep 17 00:00:00 2001
From: Andrew Heather <a.heather@opencfd.co.uk>
Date: Fri, 12 Jan 2018 10:03:47 +0000
Subject: [PATCH] COMP: move error trap to within debug scope

---
 .../LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C    | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C
index 5b88de32cd8..49e58e04476 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C
@@ -72,9 +72,12 @@ void Foam::LESModels::cubeRootVolDelta::calcDelta()
     }
     else
     {
-        FatalErrorInFunction
-            << "Case is not 3D or 2D, LES is not applicable"
-            << exit(FatalError);
+        if (debug)
+        {
+            FatalErrorInFunction
+                << "Case is not 3D or 2D, LES is not applicable"
+                << exit(FatalError);
+        }
     }
 
     // Handle coupled boundaries
-- 
GitLab