All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros
Xpetra_EpetraExceptions.hpp File Reference
#include "Xpetra_ConfigDefs.hpp"
#include "Xpetra_Exceptions.hpp"

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 61 of file Xpetra_EpetraExceptions.hpp.