[cig-commits] r16693 - short/3D/PyLith/trunk/libsrc/utils

brad at geodynamics.org brad at geodynamics.org
Wed May 12 08:27:35 PDT 2010


Author: brad
Date: 2010-05-12 08:27:35 -0700 (Wed, 12 May 2010)
New Revision: 16693

Modified:
   short/3D/PyLith/trunk/libsrc/utils/petscerror.h
Log:
Updated macro interface to PetscError().

Modified: short/3D/PyLith/trunk/libsrc/utils/petscerror.h
===================================================================
--- short/3D/PyLith/trunk/libsrc/utils/petscerror.h	2010-05-12 12:51:19 UTC (rev 16692)
+++ short/3D/PyLith/trunk/libsrc/utils/petscerror.h	2010-05-12 15:27:35 UTC (rev 16693)
@@ -26,14 +26,11 @@
 #define __FUNCT__ "<unknown>"
 #endif
 
-#define CHECK_PETSC_ERROR(err) \
-  if (err) { \
-    PetscError(PETSC_COMM_SELF, __LINE__, __FUNCT__, __FILE__, __SDIR__, err, 0, " "); \
-    throw std::runtime_error("PETSc error."); }
+#define CHECK_PETSC_ERROR(err) CHKERRXX(err)
 
 #define CHECK_PETSC_ERROR_MSG(err, msg) \
   if (err) { \
-    PetscError(PETSC_COMM_SELF, __LINE__, __FUNCT__, __FILE__, __SDIR__, err, 0, " "); \
+    PetscError(PETSC_COMM_SELF, __LINE__, __FUNCT__, __FILE__, __SDIR__, err, PETSC_ERROR_IN_CXX, 0, " "); \
     throw std::runtime_error(msg); }
 
 #endif // pylith_utils_petscerror_h



More information about the CIG-COMMITS mailing list