HP LoadRunner Protocol SDK Test Run API Reference
12.02
|
Class CProtocolException represents an exception condition. More...
#include <ProtocolException.h>
Public Member Functions | |
CProtocolException (int mErrorCode, va_list mVaList, bool mAbortNoMatterWhat) | |
To instantiate an exception, call the private method, ExceptionObject(). More... | |
CProtocolException (const CProtocolException &other) | |
Copy Constructor. | |
virtual | ~CProtocolException () |
Destructor. | |
CProtocolException & | operator= (const CProtocolException &other) |
Assignment operator. | |
int | GetErrorCode (void) |
Returns the error code. | |
const char * | GetErrorMessage (void) |
Returns the error message. | |
bool | AbortNoMatterWhat (void) |
Checks whether to abort unconditionally, regardless of continue on error flag value. More... | |
Class CProtocolException represents an exception condition.
To throw an exception, invoke the ExceptionObject function, for example:
CProtocolException::CProtocolException | ( | int | mErrorCode, |
va_list | mVaList, | ||
bool | mAbortNoMatterWhat | ||
) |
To instantiate an exception, call the private method, ExceptionObject().
ExceptionObject
handles encapsulating a variable-length argument list in an object to pass to the constructor.
The method declaration is :
For example:
mErrorCode | Either a LoadRunner code, a code from sdk_res.eng, or from your protocol eng file. |
mVaList | An object that encapsulates the arguments for variable replacement in the error message. |
mAbortNoMatterWhat | True (ABORT_NO_MATTER_WHAT)to ignore the "Continue on error" setting and abort the Vuser unconditionally. False (ABORT_BY_CONTINUE_ON_ERROR) to abort only if "Continue on error" is off. |
bool CProtocolException::AbortNoMatterWhat | ( | void | ) |
Checks whether to abort unconditionally, regardless of continue on error flag value.