OpenVSP API Documentation 3.41.0
 
Loading...
Searching...
No Matches
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 41 of file APIErrorMgr.h.

Constructor & Destructor Documentation

◆ ~ErrorObj()

vsp::ErrorObj::~ErrorObj ( )
inline

Definition at line 47 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" ); }
ERROR_CODE GetErrorCode()
Definition APIErrorMgr.h:70
@ VSP_CANT_FIND_PARM
Definition APIDefines.h:449
See also
ERROR_CODE
Returns
ERROR_CODE error code enum

Definition at line 70 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() );
}
string GetErrorString()
Definition APIErrorMgr.h:99
Returns
Error string

Definition at line 99 of file APIErrorMgr.h.

◆ NoError()

void vsp::ErrorObj::NoError ( )
inline

Definition at line 108 of file APIErrorMgr.h.

Member Data Documentation

◆ m_ErrorCode

ERROR_CODE vsp::ErrorObj::m_ErrorCode

Definition at line 105 of file APIErrorMgr.h.

◆ m_ErrorString

string vsp::ErrorObj::m_ErrorString

Definition at line 106 of file APIErrorMgr.h.


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