From 8176be6ee03dbfbace8c3294dcdc5ed055e256f5 Mon Sep 17 00:00:00 2001
From: Thomas Feuvrier <thomas.feuvrier@c-s.fr>
Date: Thu, 1 Feb 2007 07:54:23 +0000
Subject: [PATCH] =?UTF-8?q?Modification=20Macro=20ControlCondition=20:=20l?=
 =?UTF-8?q?e=20std::cout=20et=20le=20EXIT=5FFAILURE=20sont=20remplac=C3=A9?=
 =?UTF-8?q?s=20par=20une=20ExceptionMacro?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Code/Common/otbMacro.h | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/Code/Common/otbMacro.h b/Code/Common/otbMacro.h
index b2988c9847..51cb2a0f31 100755
--- a/Code/Common/otbMacro.h
+++ b/Code/Common/otbMacro.h
@@ -86,21 +86,18 @@
 }
 #endif
 
-/** This macro is used to control condition and print message. It use ONLY by the OTB developpers 
-  * This macro do an exit() program !! 
+/** This macro is used to control condition. It use ONLY by the OTB developpers 
+  *  
   */
 #define otbControlConditionTestMacro(condition, message) \
 {       if( (condition) ) \
         { \
-                std::cout << "Test failed at line " << __LINE__ << " in file " << __FILE__  << "\n" \
-                          << "Error message: " << message << "\n\n"; \
-                exit(EXIT_FAILURE);\
+                itk::ExceptionMacro(<<message<<"\n -> condition '"<<condition<<"' not OK.\n\n"; \
         } \
 }
 
 
 
-
 namespace otb
 {
 
-- 
GitLab