OpenVSP API Documentation  3.38.0
Public Member Functions | Public Attributes | List of all members
vsp::ErrorObj Class Reference

#include <APIErrorMgr.h>

Collaboration diagram for vsp::ErrorObj:
[legend]

Public Member Functions

 ErrorObj (ERROR_CODE err_code, const string &err_str)
 
 ErrorObj (const ErrorObj &from)
 
ERROR_CODE GetErrorCode ()
 
string GetErrorString ()
 
void NoError ()
 

Public Attributes

ERROR_CODE m_ErrorCode
 
string m_ErrorString
 

Detailed Description

ErrorObj is defined by an error code enum and associated error string.

Definition at line 40 of file APIErrorMgr.h.

Member Function Documentation

◆ GetErrorCode()

ERROR_CODE vsp::ErrorObj::GetErrorCode ( )
inline

Get the ERROR_CODE enum of the last raised error

ErrorObj err = PopLastError();
if ( err.GetErrorCode() != VSP_CANT_FIND_PARM ) { Print( "---> Error: API PopLast" ); }
@ VSP_CANT_FIND_PARM
Definition: APIDefines.h:397
See also
ERROR_CODE
Returns
ERROR_CODE error code enum

Definition at line 69 of file APIErrorMgr.h.

◆ GetErrorString()

string vsp::ErrorObj::GetErrorString ( )
inline

Get the error string of the last raised error

//==== Check For API Errors ====//
while ( GetNumTotalErrors() > 0 )
{
ErrorObj err = PopLastError();
Print( err.GetErrorString() );
}
Returns
Error string

Definition at line 98 of file APIErrorMgr.h.


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