Teamcenter C++ API Reference  2312
Public Member Functions | List of all members
PomResultStatus Class Reference

A PomResultStatus instance is a temporary object to which both error codes and instances of status_t can be assigned.
If, once such has been assigned, the result turns out to be a failure, the class will throw an IFail using the specified error.
This is the main difference with ResultStatus: More...

#include <PomResultStatus.hxx>

Public Member Functions

PomResultStatusoperator= (int ifail)
 
 PomResultStatus ()
 
 PomResultStatus (int ifail)
 
 PomResultStatus (int ifail, const char *s1, const char *s2=0, const char *s3=0, const char *s4=0, const char *s5=0, const char *s6=0, const char *s7=0)
 
virtual ~PomResultStatus ()
 

Detailed Description

A PomResultStatus instance is a temporary object to which both error codes and instances of status_t can be assigned.
If, once such has been assigned, the result turns out to be a failure, the class will throw an IFail using the specified error.
This is the main difference with ResultStatus:

Also, keep in mind that the operator = of this class should be used ONLY if the error message is of no importance or if it does not contain any parameter. If this is not the case, use the constructor with parameters.

try
{
//NOTE: No need to check what calls have returned.
// If this is an error, the ResultStatus class will ensure that an exception is thrown.
ok = callSomeFunction();
ok = callSomeOtherFunction();
[...]
}
catch ( IFail& ifail )
{
//Handle the exception here
[...]
}

Definition at line 51 of file PomResultStatus.hxx.

Constructor & Destructor Documentation

PomResultStatus::PomResultStatus ( )

Default constructor

PomResultStatus::PomResultStatus ( int  ifail)

If the parameter ifail is not ITK_ok, adds the specified error to the error stack and throws an IFail exception.

Note
Use this one if the returned error does not take any parameter
PomResultStatus::PomResultStatus ( int  ifail,
const char *  s1,
const char *  s2 = 0,
const char *  s3 = 0,
const char *  s4 = 0,
const char *  s5 = 0,
const char *  s6 = 0,
const char *  s7 = 0 
)

If the parameter ifail is not ITK_ok, adds the specified error to the error stack and throws an IFail exception.

Note
Use this one if the returned error code takes a parameter
virtual PomResultStatus::~PomResultStatus ( )
virtual

Destructor

Member Function Documentation

PomResultStatus& PomResultStatus::operator= ( int  ifail)

If the parameter ifail is not ITK_ok, adds the specified error to the error stack and throws an IFail exception.

Note
Use this one if the returned error code does not take any parameter

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