summaryrefslogtreecommitdiff
path: root/utils/nslist/nslist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nslist/nslist.cpp')
-rw-r--r--utils/nslist/nslist.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/utils/nslist/nslist.cpp b/utils/nslist/nslist.cpp
index a37959d410a..6ac49370a10 100644
--- a/utils/nslist/nslist.cpp
+++ b/utils/nslist/nslist.cpp
@@ -361,6 +361,8 @@ namespace
int
ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
+ int err = 0;
+
try
{
// Contact the orb
@@ -718,14 +720,23 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
((showCtxIOR)? str.in () : "")));
list_context (root_nc.in (), 1);
}
- orb->destroy ();
}
catch (const CORBA::Exception& ex)
{
ex._tao_print_exception ("Exception in nslist");
+ ++err;
+ }
+
+ try
+ {
orb->destroy ();
- return -1;
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ACE_DEBUG ((LM_DEBUG, "\nError:\n"));
+ ex._tao_print_exception ("Exception in while shutting down");
+ ++err;
}
- return 0;
+ return err;
}