From 4e29384ba844bcf4e9aada6db495b095e07f2be0 Mon Sep 17 00:00:00 2001
From: Thomas Feuvrier <thomas.feuvrier@c-s.fr>
Date: Fri, 15 Dec 2006 18:27:05 +0000
Subject: [PATCH] =?UTF-8?q?Ajout=20Macro=20permettant=20de=20controler=20u?=
 =?UTF-8?q?ne=20condition,=20d'afficher=20le=20message=20d'erreur=20et=20d?=
 =?UTF-8?q?e=20faire=20un=20exit()=20si=20la=20condition=20de=20l'erreur?=
 =?UTF-8?q?=20est=20verifi=C3=A9e.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Code/Common/otbMacro.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Code/Common/otbMacro.h b/Code/Common/otbMacro.h
index 453caab87e..b2988c9847 100755
--- a/Code/Common/otbMacro.h
+++ b/Code/Common/otbMacro.h
@@ -86,6 +86,20 @@
 }
 #endif
 
+/** This macro is used to control condition and print message. It use ONLY by the OTB developpers 
+  * This macro do an exit() program !! 
+  */
+#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);\
+        } \
+}
+
+
+
 
 namespace otb
 {
-- 
GitLab