diff options
author | Benoit Foucher <benoit@zeroc.com> | 2019-08-30 12:06:08 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2019-08-30 12:06:08 +0200 |
commit | 552d3e916337b7fedec06b05b0f78d9ab3084dc2 (patch) | |
tree | 1846d3b0ae27163cac0191fd305f93fb77005eaf /csharp/src | |
parent | Fixed Ice/admin test to not wait indefinitely, fixes #343 (diff) | |
download | ice-552d3e916337b7fedec06b05b0f78d9ab3084dc2.tar.bz2 ice-552d3e916337b7fedec06b05b0f78d9ab3084dc2.tar.xz ice-552d3e916337b7fedec06b05b0f78d9ab3084dc2.zip |
Fixed IceBox exception handling, fixes #486
Diffstat (limited to 'csharp/src')
-rw-r--r-- | csharp/src/IceBox/ServiceManagerI.cs | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/csharp/src/IceBox/ServiceManagerI.cs b/csharp/src/IceBox/ServiceManagerI.cs index 07a001dda5f..9df47c9d1ea 100644 --- a/csharp/src/IceBox/ServiceManagerI.cs +++ b/csharp/src/IceBox/ServiceManagerI.cs @@ -387,19 +387,10 @@ class ServiceManagerI : ServiceManagerDisp_ // Start Admin (if enabled) and/or deprecated IceBox.ServiceManager OA // _communicator.addAdminFacet(this, "IceBox.ServiceManager"); - try + _communicator.getAdmin(); + if(adapter != null) { - _communicator.getAdmin(); - if(adapter != null) - { - adapter.activate(); - } - } - catch(Ice.ObjectAdapterDeactivatedException) - { - // - // Expected if the communicator has been shutdown. - // + adapter.activate(); } // @@ -426,6 +417,14 @@ class ServiceManagerI : ServiceManagerDisp_ _logger.error(ex.ToString()); return 1; } + catch(Ice.CommunicatorDestroyedException) + { + // Expected if the communicator is shutdown + } + catch(Ice.ObjectAdapterDeactivatedException) + { + // Expected if the communicator is shutdown + } catch(Exception ex) { _logger.error("ServiceManager: caught exception:\n" + ex.ToString()); |