diff options
Diffstat (limited to 'examples/Event_Comm/supplier.cpp')
-rw-r--r-- | examples/Event_Comm/supplier.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/examples/Event_Comm/supplier.cpp b/examples/Event_Comm/supplier.cpp index 7991b1e4631..97431ab7973 100644 --- a/examples/Event_Comm/supplier.cpp +++ b/examples/Event_Comm/supplier.cpp @@ -70,14 +70,23 @@ ACE_TMAIN(int argc, ACE_TCHAR *argv[]) // Initialize server daemon. Supplier supplier; - if (supplier.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p\n", - "supplier init failed"), - 1); + try + { + + if (supplier.init (argc, argv) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n", + "supplier init failed"), + 1); - // Loop forever handling events. - supplier.run (); + // Loop forever handling events. + supplier.run (); + } + catch (const ::CORBA::Exception &e) + { + e._tao_print_exception ("Caught unexpected CORBA exception : "); + return 1; + } return 0; } |