Skip to content

Commit

Permalink
New iRel interface has more consistent error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jedbrown committed Mar 21, 2011
1 parent 9c1be41 commit 9ac26b1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions include/dohpmesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ extern const char *const iBase_TagValueTypeName[];
dERROR(PETSC_COMM_SELF,1,"iGeom(%d) %s: %s",_l_ret,iBase_ErrorString[_l_ret],_l_desc); \
} \
} while (0)

#define dIRCHK(assoc,err) \
if (PetscUnlikely(err)) \
dERROR(PETSC_COMM_SELF,1,"iRel(%d) %s: %s",err,iBase_ErrorString[iRel_LAST_ERROR.error_type],iRel_LAST_ERROR.description)
#define dIRCHK(rel,err) do { \
if (PetscUnlikely(err)) { \
dErr _l_ret = err; \
char _l_desc[512] = "Description not available"; \
iRel_getDescription(rel,_l_desc,&err,sizeof(_l_desc)); \
dERROR(PETSC_COMM_SELF,1,"iRel(%d) %s: %s",_l_ret,iBase_ErrorString[_l_ret],_l_desc); \
} \
} while (0)


typedef struct {
Expand Down

0 comments on commit 9ac26b1

Please sign in to comment.