本文整理汇总了C++中Test_var::terminate方法的典型用法代码示例。如果您正苦于以下问题:C++ Test_var::terminate方法的具体用法?C++ Test_var::terminate怎么用?C++ Test_var::terminate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Test_var
的用法示例。
在下文中一共展示了Test_var::terminate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: catch
int
ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
try {
// Initialize orb
CORBA::ORB_var orb = CORBA::ORB_init( argc, argv );
if (parse_args (argc, argv) != 0)
return 1;
CORBA::Object_var obj = orb->resolve_initial_references("Test");
Test_var test;
try
{
test = Test::_narrow( obj.in() );
if (killit)
{
test->terminate ();
}
else
{
CORBA::Short n = test->get_server_num ();
ACE_DEBUG ((LM_DEBUG,
"Client received reply from server %d on first attempt\n",
n));
}
}
catch (const CORBA::Exception &ex)
{
ex._tao_print_exception ("Client caught: ");
#if 0
try
{
if (CORBA::is_nil (test.in()))
{
test = Test::_narrow( obj.in() );
}
CORBA::Short n = test->get_server_num ();
ACE_DEBUG ((LM_DEBUG,
"Client received reply from server %d on second attempt\n",
n));
}
catch (const CORBA::Exception &ex)
{
ex._tao_print_exception ("Client second attempt: ");
}
#endif
}
orb->destroy ();
return 0;
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("client:");
}
return -1;
}