diff options
Diffstat (limited to 'tests/DynAny_Test/driver.cpp')
-rw-r--r-- | tests/DynAny_Test/driver.cpp | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/tests/DynAny_Test/driver.cpp b/tests/DynAny_Test/driver.cpp index 40de75a5f49..e143ff00d6b 100644 --- a/tests/DynAny_Test/driver.cpp +++ b/tests/DynAny_Test/driver.cpp @@ -27,23 +27,33 @@ int ACE_TMAIN (int argc, ACE_TCHAR *argv[]) { - Driver driver; + int error_count = 0; + try + { + Driver driver; - // initialize the driver - if (driver.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) driver.cpp - " - "Driver initialization failed\n"), - -1); + // initialize the driver + if (driver.init (argc, argv) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) driver.cpp - " + "Driver initialization failed\n"), + -1); - // run the tests - int error_count = driver.run (); - if (error_count != 0) + // run the tests + error_count = driver.run (); + if (error_count != 0) + { + ACE_ERROR ((LM_ERROR, + "(%N:%l) driver.cpp - " + "%d tests failed\n", + error_count)); + } + } + catch (const CORBA::Exception& ex) { - ACE_ERROR ((LM_ERROR, - "(%N:%l) driver.cpp - " - "%d tests failed\n", - error_count)); + ex._tao_print_exception ("Caught unexpected CORBA exception:"); + + ++error_count; } return error_count; |