moab
moab::Error Class Reference

#include <Error.hpp>

List of all members.

Public Member Functions

 Error ()
 ~Error ()
ErrorCode set_last_error (const std::string &error)
ErrorCode set_last_error (const char *fmt,...) MB_PRINTF(1)
ErrorCode set_last_error (const char *fmt, va_list args)
ErrorCode get_last_error (std::string &error) const

Private Attributes

std::string mLastError
 string to hold the last error that occurred in MB

Detailed Description

Examples:
DeformMeshRemap.cpp.

Definition at line 54 of file Error.hpp.


Constructor & Destructor Documentation

moab::Error::Error ( ) [inline]

Definition at line 61 of file Error.hpp.

{}
moab::Error::~Error ( ) [inline]

Definition at line 62 of file Error.hpp.

{}

Member Function Documentation

ErrorCode moab::Error::get_last_error ( std::string &  error) const [inline]

Definition at line 80 of file Error.hpp.

  { 
    error = mLastError; 
    return MB_SUCCESS;
  }
ErrorCode moab::Error::set_last_error ( const std::string &  error) [inline]
Examples:
DeformMeshRemap.cpp.

Definition at line 64 of file Error.hpp.

  { 
    mLastError = error; 
    return MB_SUCCESS; 
  }
ErrorCode moab::Error::set_last_error ( const char *  fmt,
  ... 
) [inline]

Definition at line 88 of file Error.hpp.

{
  ErrorCode result = MB_FAILURE;
  if (fmt)
  {
    va_list args;
    va_start( args, fmt );
    result = set_last_error( fmt, args );
    va_end( args );
  }
  return result;
}
ErrorCode moab::Error::set_last_error ( const char *  fmt,
va_list  args 
) [inline]

Definition at line 72 of file Error.hpp.

  {
    char text[1024];
    VSNPRINTF( text, sizeof(text), fmt, args );
    mLastError = text;
    return MB_SUCCESS;
  }

Member Data Documentation

std::string moab::Error::mLastError [private]

string to hold the last error that occurred in MB

Definition at line 57 of file Error.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines