本文整理汇总了C++中lldb::SBError::Fail方法的典型用法代码示例。如果您正苦于以下问题:C++ SBError::Fail方法的具体用法?C++ SBError::Fail怎么用?C++ SBError::Fail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lldb::SBError
的用法示例。
在下文中一共展示了SBError::Fail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DriverParseArgs
//++ ------------------------------------------------------------------------------------
// Details: Get the current driver to validate executable command line arguments.
// Type: Method.
// Args: argc - (R) An integer that contains the count of arguments that follow in
// argv. The argc parameter is always greater than or equal to 1.
// argv - (R) An array of null-terminated strings representing command-line
// arguments entered by the user of the program. By convention,
// argv[0] is the command with which the program is invoked.
// vpStdOut - (R) Point to a standard output stream.
// vwbExiting - (W) True = *this want to exit, false = continue to work.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMIDriverMgr::DriverParseArgs( const int argc, const char * argv[], FILE * vpStdOut, bool & vwbExiting )
{
if( m_pDriverCurrent == nullptr )
{
const CMIUtilString errMsg( CMIUtilString::Format( MIRSRC( IDS_DRIVER_ERR_CURRENT_NOT_SET ) ) );
CMICmnStreamStdout::Instance().Write( errMsg, true );
return MIstatus::failure;
}
const lldb::SBError error( m_pDriverCurrent->DoParseArgs( argc, argv, vpStdOut, vwbExiting ) );
bool bOk = !error.Fail();
if( !bOk )
{
CMIUtilString errMsg;
const MIchar * pErrorCstr = error.GetCString();
if( pErrorCstr != nullptr )
errMsg = CMIUtilString::Format( MIRSRC( IDS_DRIVER_ERR_PARSE_ARGS ), m_pDriverCurrent->GetName().c_str(), pErrorCstr );
else
errMsg = CMIUtilString::Format( MIRSRC( IDS_DRIVER_ERR_PARSE_ARGS_UNKNOWN ), m_pDriverCurrent->GetName().c_str() );
bOk = CMICmnStreamStdout::Instance().Write( errMsg, true );
}
return bOk;
}