]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Additional braces in the Assert and AssertThrow macros.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Jan 2000 14:25:57 +0000 (14:25 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 10 Jan 2000 14:25:57 +0000 (14:25 +0000)
git-svn-id: https://svn.dealii.org/trunk@2180 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/exceptions.h

index f2469e4c1029c478e61144ed1fea432f97d7fa82..1ae7fd10b8683813ee412d1350f8653a03de870a 100644 (file)
@@ -418,11 +418,13 @@ void __IssueError_Throw (const char *file,
  *  @see ExceptionBase
  *  @author Wolfgang Bangerth, November 1997, extensions 1998
  */
-#define Assert(cond, exc)                              \
-  if (!(cond))                                         \
-    __IssueError_Assert (__FILE__,                    \
-                        __LINE__,                    \
-                        __PRETTY_FUNCTION__, #cond, #exc, exc)
+#define Assert(cond, exc)                                         \
+  {                                                               \
+    if (!(cond))                                                  \
+      __IssueError_Assert (__FILE__,                              \
+                          __LINE__,                              \
+                          __PRETTY_FUNCTION__, #cond, #exc, exc);\
+  }
 
 
 #else        ////////////////////////////////////////
@@ -443,11 +445,13 @@ void __IssueError_Throw (const char *file,
  *  @see ExceptionBase
  *  @author Wolfgang Bangerth, November 1997, extensions 1998
  */
-#define AssertThrow(cond, exc)                       \
-  if (!(cond))                                       \
-    __IssueError_Throw (__FILE__,                    \
-                       __LINE__,                    \
-                       __PRETTY_FUNCTION__, #cond, #exc, exc)
+#define AssertThrow(cond, exc)                                   \
+  {                                                              \
+    if (!(cond))                                                 \
+      __IssueError_Throw (__FILE__,                              \
+                         __LINE__,                              \
+                         __PRETTY_FUNCTION__, #cond, #exc, exc);\
+  }
 
   
 
@@ -471,7 +475,7 @@ class Exception0 :  public ExceptionBase {};
 class Exception1 : public ExceptionBase {                             \
   public:                                                             \
       Exception1 (const type1 a1) : arg1 (a1) {};                     \
-      virtual void PrintInfo (ostream &out) const {                           \
+      virtual void PrintInfo (ostream &out) const {                   \
         out outsequence << endl;                                      \
       };                                                              \
   private:                                                            \

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.