Teamcenter C++ API Reference  2312
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Teamcenter::Error Class Reference

The most-recent error, and related information. If required, we may turn this into an iterable error list, starting with the most recent. More...

#include <error_map.hxx>

Public Member Functions

 Error ()
 ITK_ok "error". More...
 
std::string errorMessage () const
 
int ifail () const
 Integer ifail, errorMessage. More...
 
bool isError () const
 Is the most-recent ifail not ITK_ok? More...
 
bool isOk () const
 Is the most-recent ifail ITK_ok? More...
 
 operator ResultStatus () const
 Throw IFail if not ITK_ok. More...
 
 ~Error ()
 

Private Member Functions

 Error (int ifail)
 Construct with ifail value, errorMessage. More...
 

Private Attributes

std::string m_errorMessage
 
int m_ifail
 Error data, cf. EMH_ask_errors. More...
 

Friends

Error Teamcenter::Private::pushErrorStack (int ifail, const char *s1, const char *s2, const char *s3, const char *s4, const char *s5, const char *s6, const char *s7)
 
Error Teamcenter::Private::readErrorStack (int ifail)
 
Error Teamcenter::Private::takeErrorStack (int ifail)
 
Error Teamcenter::Private::takeErrorStack (IFail const &ifail)
 
Error Teamcenter::Private::takeErrorStack (status_t const &status)
 

Detailed Description

The most-recent error, and related information. If required, we may turn this into an iterable error list, starting with the most recent.

If a function returns an Error, this can be tested for goodness in ResultStatus style... sample:

// Declare function
Error func1( argdecls... );
try
{
// Call function returning an Error.
ResultStatus ithrow = func1( args... );
}
catch ( Ifail& )
{
// Handle error.
}
Note
Default constructor, copy and assign required for std container insertion.

Definition at line 108 of file error_map.hxx.

Constructor & Destructor Documentation

Teamcenter::Error::Error ( )
inline

ITK_ok "error".

Definition at line 283 of file error_map.hxx.

Teamcenter::Error::~Error ( )
inline

Definition at line 288 of file error_map.hxx.

Teamcenter::Error::Error ( int  ifail)
inlineexplicitprivate

Construct with ifail value, errorMessage.

Definition at line 294 of file error_map.hxx.

Member Function Documentation

std::string Teamcenter::Error::errorMessage ( ) const
inline

Definition at line 318 of file error_map.hxx.

int Teamcenter::Error::ifail ( ) const
inline

Integer ifail, errorMessage.

Definition at line 313 of file error_map.hxx.

bool Teamcenter::Error::isError ( ) const
inline

Is the most-recent ifail not ITK_ok?

Definition at line 308 of file error_map.hxx.

bool Teamcenter::Error::isOk ( ) const
inline

Is the most-recent ifail ITK_ok?

Definition at line 303 of file error_map.hxx.

Teamcenter::Error::operator ResultStatus ( ) const

Throw IFail if not ITK_ok.

Friends And Related Function Documentation

Error Teamcenter::Private::pushErrorStack ( int  ifail,
const char *  s1,
const char *  s2,
const char *  s3,
const char *  s4,
const char *  s5,
const char *  s6,
const char *  s7 
)
friend
Error Teamcenter::Private::takeErrorStack ( IFail const &  ifail)
friend

Member Data Documentation

std::string Teamcenter::Error::m_errorMessage
private

Definition at line 142 of file error_map.hxx.

int Teamcenter::Error::m_ifail
private

Error data, cf. EMH_ask_errors.

Definition at line 141 of file error_map.hxx.


The documentation for this class was generated from the following file: