From 64fbb00c752f9750956f7e98544284d4c9891f44 Mon Sep 17 00:00:00 2001 From: "William R. Otte" Date: Sat, 26 Nov 2011 06:01:23 +0000 Subject: --- DAnCE/dance/Plan_Launcher/Plan_Launcher.cpp | 22 +++++++++++++++------- .../Plan_Launcher/Plan_Launcher_Base_Impl_T.cpp | 13 +++++++++---- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/DAnCE/dance/Plan_Launcher/Plan_Launcher.cpp b/DAnCE/dance/Plan_Launcher/Plan_Launcher.cpp index 123c384db9b..98afde9d30b 100644 --- a/DAnCE/dance/Plan_Launcher/Plan_Launcher.cpp +++ b/DAnCE/dance/Plan_Launcher/Plan_Launcher.cpp @@ -699,6 +699,8 @@ start_application (const Options &opts, { pl_base->start_application (am.in (), app.out ()); + if (CORBA::is_nil (app)) + throw DAnCE::Deployment_Failure ("start_application returned a nil reference"); DANCE_DEBUG (DANCE_LOG_MAJOR_EVENT, (LM_NOTICE, DLINFO @@ -722,8 +724,14 @@ start_application (const Options &opts, ACE_TEXT ("Plan_Launcher::start_application - ") ACE_TEXT ("Writing Application IOR to <%s>\n"), app_output.c_str ())); - CORBA::String_var tmp = orb->object_to_string (app.in ()); + + DANCE_DEBUG (DANCE_LOG_TRACE, + (LM_TRACE, DLINFO + ACE_TEXT ("Plan_Launcher::start_application - ") + ACE_TEXT ("Application IOR to <%C>\n"), + tmp.in ())); + write_IOR (app_output.c_str (), tmp.in ()); @@ -733,8 +741,8 @@ start_application (const Options &opts, if (!opts.quiet_) { DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO - ACE_TEXT ("Plan_Launcher::teardown_plan - ") - ACE_TEXT ("Application Teardown failed, exception: %C\n"), + ACE_TEXT ("Plan_Launcher::start_application - ") + ACE_TEXT ("Application Launch failed, exception: %C\n"), ex.ex_.c_str ())); } rc = 1; @@ -744,8 +752,8 @@ start_application (const Options &opts, if (!opts.quiet_) { DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO - ACE_TEXT ("Plan_Launcher::teardown_plan - ") - ACE_TEXT ("Application Teardown failed, ") + ACE_TEXT ("Plan_Launcher::start_application - ") + ACE_TEXT ("Application Launch failed, ") ACE_TEXT ("caught CORBA exception %C\n"), ex._info ().c_str ())); } @@ -756,8 +764,8 @@ start_application (const Options &opts, if (!opts.quiet_) { DANCE_ERROR (DANCE_LOG_EMERGENCY, (LM_ERROR, DLINFO - ACE_TEXT ("Plan_Launcher::teardown_plan - ") - ACE_TEXT ("Application Teardown failed, ") + ACE_TEXT ("Plan_Launcher::start_application - ") + ACE_TEXT ("Application Launch failed, ") ACE_TEXT ("caught unknown C++ exception\n"))); } rc = 1; diff --git a/DAnCE/dance/Plan_Launcher/Plan_Launcher_Base_Impl_T.cpp b/DAnCE/dance/Plan_Launcher/Plan_Launcher_Base_Impl_T.cpp index 037b3a818cd..1fbda42f992 100644 --- a/DAnCE/dance/Plan_Launcher/Plan_Launcher_Base_Impl_T.cpp +++ b/DAnCE/dance/Plan_Launcher/Plan_Launcher_Base_Impl_T.cpp @@ -582,15 +582,20 @@ Plan_Launcher_Base_Impl< Manager, AppManager, Application> ::Deployment::Connections_var conns; - CORBA::Object_var app = this->start_launch (am, + CORBA::Object_var app_obj = this->start_launch (am, 0, conns.out ()); + + if (CORBA::is_nil (app_obj)) + { + throw Deployment_Failure ("Nil ApplicationManager reference from startLaunch"); + } - this->finish_launch (app.in (), + this->finish_launch (app_obj.in (), conns, false); - this->start (app.in ()); + this->start (app_obj.in ()); timer.stop (); @@ -606,7 +611,7 @@ Plan_Launcher_Base_Impl< Manager, AppManager, Application> ACE_TEXT ("Plan_Launcher_Base_Impl::start_application - ") ACE_TEXT ("Application Deployed successfully\n"))); - app = app._retn (); + app = app_obj._retn (); } catch (const CORBA::Exception& ex) { -- cgit v1.2.1