Xpetra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Xpetra_EpetraExceptions.hpp File Reference

Go to the source code of this file.

Macros

#define IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG(sourceCode)
 

Macro Definition Documentation

#define IF_EPETRA_EXCEPTION_THEN_THROW_GLOBAL_INVALID_ARG (   sourceCode)
Value:
{ \
int localFailure = 0; /* 0 == success */ \
try { \
sourceCode; \
} catch (int /*epetraErrCode*/) { \
localFailure = 1; /* 1 == failure */ \
} \
\
{ \
int globalFailure = 0; /* 0 == success */ \
Teuchos::reduceAll<int>(*comm, Teuchos::REDUCE_SUM, localFailure, Teuchos::outArg(globalFailure)); \
TEUCHOS_TEST_FOR_EXCEPTION(globalFailure != 0, std::invalid_argument, "Epetra threw exception"); \
} \
}

Definition at line 25 of file Xpetra_EpetraExceptions.hpp.