![]() |
Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
#include <Error.hpp>
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 |
moab::Error::Error | ( | ) | [inline] |
moab::Error::~Error | ( | ) | [inline] |
ErrorCode moab::Error::get_last_error | ( | std::string & | error | ) | const [inline] |
Definition at line 77 of file Error.hpp.
References MB_SUCCESS, and mLastError.
{
error = mLastError;
return MB_SUCCESS;
}
ErrorCode moab::Error::set_last_error | ( | const std::string & | error | ) | [inline] |
Definition at line 61 of file Error.hpp.
References moab::error(), MB_SUCCESS, and mLastError.
Referenced by set_last_error().
{
mLastError = error;
return MB_SUCCESS;
}
ErrorCode moab::Error::set_last_error | ( | const char * | fmt, |
... | |||
) | [inline] |
Definition at line 84 of file Error.hpp.
References ErrorCode, and set_last_error().
{
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 69 of file Error.hpp.
References MB_SUCCESS, mLastError, and VSNPRINTF.
{
char text[1024];
VSNPRINTF( text, sizeof( text ), fmt, args );
mLastError = text;
return MB_SUCCESS;
}
std::string moab::Error::mLastError [private] |
string to hold the last error that occurred in MB
Definition at line 55 of file Error.hpp.
Referenced by get_last_error(), and set_last_error().