OpenVSPAPI  3.23.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 ()
 
void SilenceErrors ()
 
void PrintOnErrors ()
 

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

◆ PrintOnErrors()

void PrintOnErrors ( )

Cuase errors to be printed to stdout as they occur.

//==== Tell API to print error messages ====//

◆ SilenceErrors()

void SilenceErrors ( )

Prevent errors from printing to stdout as they occur.

//==== Force API to silence error messages ====//
ErrorObj::GetErrorString
string GetErrorString()
SilenceErrors
void SilenceErrors()
GetErrorLastCallFlag
bool GetErrorLastCallFlag()
GetNumTotalErrors
int GetNumTotalErrors()
SetParmVal
double SetParmVal(const string &in parm_id, double val)
PrintOnErrors
void PrintOnErrors()
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:995
GetLastError
ErrorObj GetLastError()