IAppIntRsp::GetErrorName

The GetErrorName method returns the name of the error, if an error occurred when the invoked command was executed.

_bstr_t bstrErrorName = pIAppIntRsp->GetErrorName();
Parameters
None.
Results
Returns a _bstr_t containing the name of the error that occurred.
Sample
The following is a fragment from the complete example for the standard IAppIntRsp interface.
   ...
   // Determine if the command failed, before accessing response component data
   hResult = spIAppIntRsp->GetHResult();
   if (FAILED(hResult)) {
      std::cout << "The command failed to execute." << std::endl;

      // Examine the error information provided in the standard response component
      _bstr_t bstrErrorName = spIAppIntRsp->GetErrorName();
      std::cout << "ErrorName=" << ( bstrErrorName.length() ? (LPCSTR) bstrErrorName : _T( "" ) ) << std::endl;
      _bstr_t bstrErrorMsg = spIAppIntRsp->GetErrorMsg();
      std::cout << "ErrorMsg=" << ( bstrErrorMsg.length() ? (LPCSTR) bstrErrorMsg : _T( "" ) ) << std::endl;
      _bstr_t bstrErrorDetails = spIAppIntRsp->GetErrorDetails();
      std::cout << "ErrorDetails=" << ( bstrErrorDetails.length() ? (LPCSTR) bstrErrorDetails : _T( "" ) ) << std::endl;
      _ASSERTE(0);
   } else {
      ...
   }
   ...