MOAB: Mesh Oriented datABase  (version 5.1.1)
Error Handling
+ Collaboration diagram for Error Handling:

Functions

void iMesh_getErrorType (iMesh_Instance instance, int *error_type)
 Get the error type returned from the last iMesh function.
void iMesh_getDescription (iMesh_Instance instance, char *descr, int descr_len)
 Get a description of the error returned from the last iMesh function.

Function Documentation

void iMesh_getDescription ( iMesh_Instance  instance,
char *  descr,
int  descr_len 
)

Get a description of the error returned from the last iMesh function.

Parameters:
[in]instanceiMesh instance handle
[in,out]descrPointer to a character string to be filled with a description of the error from the last iMesh function
[in]descr_lenLength of the character string pointed to by descr (String Length Arguments)

Definition at line 259 of file iMesh_MOAB.cpp.

References MBIMESHI, and MIN.

  {
    if (instance == NULL) {
      strcpy(descr, "iMesh_getDescription: Invalid instance");
    }
    else {
      unsigned int len = MIN(strlen(MBIMESHI->lastErrorDescription),
                             static_cast<unsigned int>(descr_len));
      strncpy(descr, MBIMESHI->lastErrorDescription, len);
      descr[len] = '\0';
    }
  }
void iMesh_getErrorType ( iMesh_Instance  instance,
int *  error_type 
)

Get the error type returned from the last iMesh function.

Parameters:
[in]instanceiMesh instance handle
[out]error_typeError type returned from last iMesh function (see iBase_ErrorType)

Definition at line 251 of file iMesh_MOAB.cpp.

References iBase_FAILURE, and MBIMESHI.

  {
    if (instance == NULL)
      *error_type = iBase_FAILURE;
    else
      *error_type = MBIMESHI->lastErrorType;
  }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines