18#ifndef __EXCEPTIONS_HPP__
19#define __EXCEPTIONS_HPP__
45 strcpy(
errorMessage,
"Houston we have a problem, something is wrong");
76 inline operator PetscErrorCode()
const {
return iERR; }
82 inline operator moab::ErrorCode()
const {
return rVAL; }
110 if (PetscUnlikely(err)) {
121 if (PetscLikely(MB_SUCCESS != err)) {
122 std::string error_str = (unsigned)err <= (
unsigned)MB_FAILURE
123 ? moab::ErrorCodeStr[err]
124 :
"INVALID ERROR CODE";
125 std::string str(
"MOAB error (" + boost::lexical_cast<std::string>(err) +
135using 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)