catch (MoFEMExceptionInitial const &ex) { \
LOG_FUNCTION_NAME_WITH_OP_NAME(
OP,
"SELF", Sev::error) \
<< "in " << PETSC_FUNCTION_NAME; \
return PetscError(PETSC_COMM_SELF, ex.lINE, PETSC_FUNCTION_NAME, __FILE__, \
ex.errorCode, PETSC_ERROR_INITIAL, "%s", ex.what()); \
} \
catch (MoFEMExceptionRepeat const &ex) { \
LOG_FUNCTION_NAME_WITH_OP_NAME(
OP,
"SELF", Sev::error) \
<< "in " << PETSC_FUNCTION_NAME; \
return PetscError(PETSC_COMM_SELF, ex.lINE, PETSC_FUNCTION_NAME, __FILE__, \
ex.errorCode, PETSC_ERROR_REPEAT, " "); \
} \
catch (MoFEMException const &ex) { \
LOG_FUNCTION_NAME_WITH_OP_NAME(
OP,
"SELF", Sev::error) \
<< "in " << PETSC_FUNCTION_NAME; \
SETERRQ(PETSC_COMM_SELF, ex.errorCode, "%s", ex.errorMessage); \
} \
catch (std::exception const &ex) { \
LOG_FUNCTION_NAME_WITH_OP_NAME(
OP,
"SELF", Sev::error) \
<< "\nError: " << ex.what() << " at " << __LINE__ << " : " __FILE__ \
<< " in " << PETSC_FUNCTION_NAME; \
"std::exception"); \
}
@ MOFEM_STD_EXCEPTION_THROW
1354#define CATCH_OP_ERRORS(OP) \
1355 catch (MoFEMExceptionInitial const &ex) { \
1356 LOG_FUNCTION_NAME_WITH_OP_NAME(OP, "SELF", Sev::error) \
1357 << "in " << PETSC_FUNCTION_NAME; \
1358 return PetscError(PETSC_COMM_SELF, ex.lINE, PETSC_FUNCTION_NAME, __FILE__, \
1359 ex.errorCode, PETSC_ERROR_INITIAL, "%s", ex.what()); \
1360 } \
1361 catch (MoFEMExceptionRepeat const &ex) { \
1362 LOG_FUNCTION_NAME_WITH_OP_NAME(OP, "SELF", Sev::error) \
1363 << "in " << PETSC_FUNCTION_NAME; \
1364 return PetscError(PETSC_COMM_SELF, ex.lINE, PETSC_FUNCTION_NAME, __FILE__, \
1365 ex.errorCode, PETSC_ERROR_REPEAT, " "); \
1366 } \
1367 catch (MoFEMException const &ex) { \
1368 LOG_FUNCTION_NAME_WITH_OP_NAME(OP, "SELF", Sev::error) \
1369 << "in " << PETSC_FUNCTION_NAME; \
1370 SETERRQ(PETSC_COMM_SELF, ex.errorCode, "%s", ex.errorMessage); \
1371 } \
1372 catch (std::exception const &ex) { \
1373 LOG_FUNCTION_NAME_WITH_OP_NAME(OP, "SELF", Sev::error) \
1374 << "\nError: " << ex.what() << " at " << __LINE__ << " : " __FILE__ \
1375 << " in " << PETSC_FUNCTION_NAME; \
1376 SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, "%s", \
1377 "std::exception"); \
1378 }