当前位置: 首页>>代码示例>>C++>>正文


C++ SBError::Fail方法代码示例

本文整理汇总了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;
}
开发者ID:chee-z,项目名称:lldb,代码行数:39,代码来源:MIDriverMgr.cpp


注:本文中的lldb::SBError::Fail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。