[cig-commits] r21655 - short/3D/PyLith/trunk/libsrc/pylith/utils
brad at geodynamics.org
brad at geodynamics.org
Wed Mar 27 13:01:51 PDT 2013
Author: brad
Date: 2013-03-27 13:01:51 -0700 (Wed, 27 Mar 2013)
New Revision: 21655
Modified:
short/3D/PyLith/trunk/libsrc/pylith/utils/petscerror.h
Log:
Added macros for begin/end of methods for better error trapping.
Modified: short/3D/PyLith/trunk/libsrc/pylith/utils/petscerror.h
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/utils/petscerror.h 2013-03-27 19:41:48 UTC (rev 21654)
+++ short/3D/PyLith/trunk/libsrc/pylith/utils/petscerror.h 2013-03-27 20:01:51 UTC (rev 21655)
@@ -28,10 +28,16 @@
#undef __FUNCT__
#if defined(__FUNCTION_NAME__)
#define __FUNCT__ __FUNCTION_NAME__
+#undef PETSC_FUNCTION_NAME
+#define PETSC_FUNCTION_NAME __FUNCT__
#else
-#define __FUNCT__ "<unknown>"
+#define __FUNCT__ __func__
#endif
+#define PYLITH_METHOD_BEGIN PetscFunctionBegin
+#define PYLITH_METHOD_END PetscFunctionReturnVoid()
+#define PYLITH_METHOD_RETURN(v) PetscFunctionReturn(v)
+
#define CHECK_PETSC_ERROR(err) CHKERRXX(err)
#define CHECK_PETSC_ERROR_MSG(err, msg) \
More information about the CIG-COMMITS
mailing list