3 #include "ace/Auto_Event.h"
5 #include "tao/Object.h"
6 #include "tao/SystemException.h"
9 test_string_to_object (CORBA::ORB_ptr orb
, const char* ior
, CORBA::ULong minor
)
14 // Get the object reference with the IOR
15 CORBA::Object_var object
= orb
->string_to_object (ior
);
17 catch (const CORBA::BAD_PARAM
& ex
)
19 if ((ex
.minor() & 0xFFFU
) == minor
)
24 catch (const CORBA::Exception
&)
31 "(%t) ERROR, test_string_to_object for <%C> didn't result in minor code %d\n",
40 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
47 CORBA::ORB_init (argc
, argv
);
49 // string_to_object conversion failed due to bad scheme name
50 if (!test_string_to_object (orb
.in (), "", 7))
52 // string_to_object conversion failed due to bad address
53 if (!test_string_to_object (orb
.in (), "", 8))
55 // string_to_object conversion failed due to bad bad schema specific part
56 if (!test_string_to_object (orb
.in (), "", 9))
58 // string_to_object conversion failed due to non specific reason
59 if (!test_string_to_object (orb
.in (), "", 10))
68 catch (const CORBA::Exception
& ex
)
70 ex
._tao_print_exception ("Exception caught");