OpenVSPAPI  3.20.0
Functions
API Error Functions

Handeling of OpenVSP ErrorObj information is accomplished through this group of API functions.

Click here to return to the main page. More...

Functions

bool GetErrorLastCallFlag ()
 
int GetNumTotalErrors ()
 
ErrorObj PopLastError ()
 
ErrorObj GetLastError ()
 

Detailed Description

Function Documentation

◆ GetErrorLastCallFlag()

bool GetErrorLastCallFlag ( )

Check if there was an error on the last call to the API

//==== Bogus Call To Create API Error ====//
Print( string( "---> Test Error Handling" ) );
SetParmVal( "BogusParmID", 23.0 );
if ( !GetErrorLastCallFlag() ) { Print( "---> Error: API GetErrorLastCallFlag " ); }
Returns
False if no error, true otherwise

◆ GetLastError()

ErrorObj GetLastError ( )

Return the most recent error from the stack (does NOT pop error off the stack)

//==== Check For API Errors ====//
Returns
Error object

◆ GetNumTotalErrors()

int GetNumTotalErrors ( )

Count the total number of errors on the stack

//==== Check For API Errors ====//
while ( GetNumTotalErrors() > 0 )
{
}
Returns
Number of errors

◆ PopLastError()

ErrorObj PopLastError ( )

Pop (remove) and return the most recent error from the stack

//==== Check For API Errors ====//
while ( GetNumTotalErrors() > 0 )
{
}
Returns
Error object
ErrorObj::GetErrorString
string GetErrorString()
GetErrorLastCallFlag
bool GetErrorLastCallFlag()
GetNumTotalErrors
int GetNumTotalErrors()
SetParmVal
double SetParmVal(const string &in parm_id, double val)
PopLastError
ErrorObj PopLastError()
Print
void Print(const string &in data, bool new_line=true)
ErrorObj
A class for representing API Errors.
Definition: openvsp_as.h:987
GetLastError
ErrorObj GetLastError()