Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / Connection_Failure / client.cpp
blob38658ec1661aafb03bd1b0c2cc37ab33cd33cec2
1 #include "testC.h"
2 #include "tao/SystemException.h"
4 #include "ace/Log_Msg.h"
6 const char *ior =
7 "corbaloc:iiop:192.3.47/10007/RandomObject";
9 int
10 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
12 try
14 CORBA::ORB_var orb =
15 CORBA::ORB_init (argc, argv);
17 CORBA::Object_var tmp =
18 orb->string_to_object (ior);
20 // First connection happens here..
21 test::_narrow (tmp.in ());
23 catch (const CORBA::TRANSIENT& )
25 // This exception is correct.
26 ACE_DEBUG ((LM_DEBUG,
27 "_narrow() to non-existent object failed correctly. Test succeeded.\n"));
28 return 0;
30 catch (const ::CORBA::Exception &ex)
32 ex._tao_print_exception("ERROR : unexpected CORBA exception caugth :");
34 // Should not reach here.
35 ACE_ERROR_RETURN ((LM_ERROR,
36 "_narrow() succeeded to non-existent object when it should not have...\n"),
37 -1);