MeshKit  1.0
Error.hpp File Reference
#include <string>
#include <typeinfo>
#include "meshkit/iGeom.hpp"
#include "meshkit/iMesh.hpp"
#include "meshkit/iRel.hpp"
Include dependency graph for Error.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Error
 The Error object returned from or thrown by many MeshKit functions. More...

Namespaces

namespace  MeshKit

Defines

#define ECERRCHK(err, descr)
#define MKERRCHK(err, descr)
#define MBERRCHK(err, mbimpl)
#define IBERRCHK(err, x)   IBERRCHK_((err), (x), __FILE__, __LINE__)

Enumerations

enum  ErrorCode {
  MK_SUCCESS = 0, MK_FAILURE, MK_NOT_FOUND, MK_MULTIPLE_FOUND,
  MK_MESHOP_NOT_FOUND, MK_NOT_IMPLEMENTED, MK_WRONG_DIMENSION, MK_ALREADY_DEFINED,
  MK_BAD_INPUT, MK_BAD_GEOMETRIC_EVALUATION, MK_INCOMPLETE_MESH_SPECIFICATION
}

Functions

void IBERRCHK_ (int err, const char *descr)
void IBERRCHK_ (int err, iMesh &mesh)
void IBERRCHK_ (int err, iGeom &geom)
void IBERRCHK_ (int err, iRel &rel)
void IBERRCHK_ (int err, const char *descr, const char *file, int line)
void IBERRCHK_ (int err, iMesh &mesh, const char *file, int line)
void IBERRCHK_ (int err, iGeom &geom, const char *file, int line)
void IBERRCHK_ (int err, iRel &rel, const char *file, int line)

Detailed Description

Definition in file Error.hpp.


Define Documentation

#define ECERRCHK (   err,
  descr 
)
Value:
do {                                                                     \
    if (MK_SUCCESS != err) {                                  \
      Error tmp_err(0, "%s, line %d: %s", __FILE__, __LINE__, descr); \
      throw tmp_err;                           \
    }                                                                      \
  } while(false)

Definition at line 15 of file Error.hpp.

#define IBERRCHK (   err,
 
)    IBERRCHK_((err), (x), __FILE__, __LINE__)
Examples:
example_fbgeom.cpp, and example_parallelmesher.cpp.

Definition at line 42 of file Error.hpp.

#define MBERRCHK (   err,
  mbimpl 
)
Value:
do {                                                                     \
    if (moab::MB_SUCCESS != err) {                                         \
      std::string mb_err;                                                 \
      mbimpl->get_last_error(mb_err); \
      throw Error(err, "%s, line %d: %s", __FILE__, __LINE__, mb_err.c_str()); \
    }                                                                      \
  } while(false)

Definition at line 33 of file Error.hpp.

#define MKERRCHK (   err,
  descr 
)
Value:
do {                                                                     \
    if (MK_SUCCESS != err.error_code()) {                                  \
      Error tmp_err(0, "%s, line %d: %s: %s", __FILE__, __LINE__, err.what(), descr); \
      err.set_string(tmp_err.what()); throw err;                           \
    }                                                                      \
  } while(false)

Definition at line 24 of file Error.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines