diff options
Diffstat (limited to 'TAO/examples/POA/Default_Servant/client.cpp')
-rw-r--r-- | TAO/examples/POA/Default_Servant/client.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/TAO/examples/POA/Default_Servant/client.cpp b/TAO/examples/POA/Default_Servant/client.cpp index a1a99766578..36ce17b1e8a 100644 --- a/TAO/examples/POA/Default_Servant/client.cpp +++ b/TAO/examples/POA/Default_Servant/client.cpp @@ -79,7 +79,6 @@ main (int argc, char **argv) { // Initialize the ORB CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, 0 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Parse the command-line arguments to get the IOR parse_args (argc, argv); @@ -108,18 +107,15 @@ main (int argc, char **argv) CORBA::Object_var object = orb->string_to_object (ior.c_str () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Narrow the object reference to a File::System File::System_var file_system = File::System::_narrow (object.in () ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Creat the file filename i.e "test" File::Descriptor_var fd = file_system->open (filename, O_CREAT | O_RDWR ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; int message_length = ACE_OS::strlen (message) + 1; CORBA::Octet *buffer = File::Descriptor::DataBuffer::allocbuf (message_length); @@ -128,16 +124,13 @@ main (int argc, char **argv) // write the message to the file fd->write (data_sent ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; //seek to the beginning of the file fd->lseek (0, SEEK_SET ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Read back the written message File::Descriptor::DataBuffer_var data_received = fd->read (message_length ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; char *result = (char *) &data_received[0]; @@ -146,8 +139,7 @@ main (int argc, char **argv) result)); // close the file - fd->destroy (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + fd->destroy (); } ACE_CATCHANY { @@ -155,7 +147,6 @@ main (int argc, char **argv) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } |