src/MICmdBase.cpp
bool CMICmdBase::HandleSBError(const lldb::SBError &error,
                               const std::function<bool()> &successHandler,
                               const std::function<void()> &errorHandler) {
  if (error.Success())
    return successHandler();

  SetError(error.GetCString());
  errorHandler();
  return MIstatus::failure;
}
//++
// Details: Short cut function to check MI command's execute status and
//          set an error in case of failure.
// Type:    Method.
// Args:    error - (R) Error description object.
//          successHandler - (R) function describing actions to execute
//          in case of success state of passed SBError object.
//          errorHandler - (R) function describing actions to execute
//          in case of fail status of passed SBError object.
// Return:  bool.
// Throws:  None.
//--
Short cut function to check MI command's execute status and
set an error in case of failure.
Type:    Method.
Args:    error - (R) Error description object.
successHandler - (R) function describing actions to execute
in case of success state of passed SBError object.
errorHandler - (R) function describing actions to execute
in case of fail status of passed SBError object.
Return:  bool.
Throws:  None.
Short cut function to check MI command ' s execute status and set an error in case of failure . Type : Method . Args : error - ( R ) Error description object . successHandler - ( R ) function describing actions to execute in case of success state of passed SBError object . errorHandler - ( R ) function describing actions to execute in case of fail status of passed SBError object . Return : bool . Throws : None .
bool CMICmdBase::HandleSBError(const lldb::SBError &error,
                               const std::function<bool()> &successHandler,
                               const std::function<void()> &errorHandler) {
  if (error.Success())
    return successHandler();
  SetError(error.GetCString());
  errorHandler();
  return MIstatus::failure;
}
bool CMICmdBase :: HandleSBError ( const lldb :: SBError & error , const std :: function < bool ( ) > & successHandler , const std :: function < void ( ) > & errorHandler ) { if ( error . Success ( ) ) return successHandler ( ) ; SetError ( error . GetCString ( ) ) ; errorHandler ( ) ; return MIstatus :: failure ; }
++
Details: Short cut function to check MI command's execute status and
set an error in case of failure.
++ Details : Short cut function to check MI command ' s execute status and set an error in case of failure .