7#ifndef __EXCEPTIONS_HPP__
8#define __EXCEPTIONS_HPP__
34 strcpy(
errorMessage,
"Houston we have a problem, something is wrong");
65 inline operator PetscErrorCode()
const {
return iERR; }
71 inline operator moab::ErrorCode()
const {
return rVAL; }
99 if (PetscUnlikely(err)) {
110 if (PetscLikely(MB_SUCCESS != err)) {
111 std::string error_str = (unsigned)err <= (
unsigned)MB_FAILURE
112 ? moab::ErrorCodeStr[err]
113 :
"INVALID ERROR CODE";
114 std::string str(
"MOAB error (" + boost::lexical_cast<std::string>(err) +
124using namespace Exceptions;
MoFEMErrorCodes
Error handling.
moab::ErrorCode MoABErrorCode
MoAB error code.
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Error check for inline function check.
void operator<<(const moab::ErrorCode err)
Operator for handling moab::ErrorCode.
void operator<<(const MoFEMErrorCode err)
Operator for handling PetscErrorCode and MoFEMErrorCode.
MoFEMErrorCodeGeneric(const PetscErrorCode ierr)
MoFEMErrorCodeGeneric(const moab::ErrorCode rval)
MoFEMErrorCodeGeneric(const TYPE)
const char * what() const
MoFEMException(const int error_code)
MoFEMException(const MoFEMErrorCodes error_code)
MoFEMException(const MoFEMErrorCodes error_code, const char error_message[])
MoFEMExceptionInitial(const int error_code, const char error_message[], const int line)
MoFEMExceptionRepeat(const int error_code, const int line)