summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2003-12-16 02:46:27 +0000
committerMichi Henning <michi@zeroc.com>2003-12-16 02:46:27 +0000
commit8e61a5513d4796146bda39c2048a8aa296da88c3 (patch)
tree41aec1ea27c127985174816c38ff2a24d89e418a /cpp/src
parentChanged Ice::Exception::ice_name() to return const string&. (diff)
downloadice-8e61a5513d4796146bda39c2048a8aa296da88c3.tar.bz2
ice-8e61a5513d4796146bda39c2048a8aa296da88c3.tar.xz
ice-8e61a5513d4796146bda39c2048a8aa296da88c3.zip
glacierstarter and glacierrouter no longer abort if given a non-existent
config file.
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Glacier/GlacierRouter.cpp11
-rw-r--r--cpp/src/Glacier/GlacierStarter.cpp12
2 files changed, 19 insertions, 4 deletions
diff --git a/cpp/src/Glacier/GlacierRouter.cpp b/cpp/src/Glacier/GlacierRouter.cpp
index 2691d79026e..8a9a25c3467 100644
--- a/cpp/src/Glacier/GlacierRouter.cpp
+++ b/cpp/src/Glacier/GlacierRouter.cpp
@@ -295,8 +295,15 @@ main(int argc, char* argv[])
//
// Make sure that this process doesn't use a router.
//
- PropertiesPtr defaultProperties = getDefaultProperties(argc, argv);
- defaultProperties->setProperty("Ice.Default.Router", "");
+ try {
+ PropertiesPtr defaultProperties = getDefaultProperties(argc, argv);
+ defaultProperties->setProperty("Ice.Default.Router", "");
+ }
+ catch(const Ice::Exception& e)
+ {
+ cerr << e << endl;
+ exit(EXIT_FAILURE);
+ }
Glacier::RouterApp app;
return app.main(argc, argv);
diff --git a/cpp/src/Glacier/GlacierStarter.cpp b/cpp/src/Glacier/GlacierStarter.cpp
index a00e8f88bb9..db2d2d1503e 100644
--- a/cpp/src/Glacier/GlacierStarter.cpp
+++ b/cpp/src/Glacier/GlacierStarter.cpp
@@ -197,8 +197,16 @@ main(int argc, char* argv[])
//
// Make sure that this process doesn't use a router.
//
- PropertiesPtr defaultProperties = getDefaultProperties(argc, argv);
- defaultProperties->setProperty("Ice.Default.Router", "");
+ try
+ {
+ PropertiesPtr defaultProperties = getDefaultProperties(argc, argv);
+ defaultProperties->setProperty("Ice.Default.Router", "");
+ }
+ catch(const Ice::Exception& e)
+ {
+ cerr << e << endl;
+ exit(EXIT_FAILURE);
+ }
Glacier::RouterApp app;
return app.main(argc, argv);