diff options
Diffstat (limited to 'csharp/src')
-rw-r--r-- | csharp/src/Ice/PluginManagerI.cs | 15 | ||||
-rw-r--r-- | csharp/src/IceDiscovery/PluginI.cs | 6 | ||||
-rw-r--r-- | csharp/src/IceLocatorDiscovery/PluginI.cs | 20 |
3 files changed, 27 insertions, 14 deletions
diff --git a/csharp/src/Ice/PluginManagerI.cs b/csharp/src/Ice/PluginManagerI.cs index 3069c1e1488..a663b0a9eb7 100644 --- a/csharp/src/Ice/PluginManagerI.cs +++ b/csharp/src/Ice/PluginManagerI.cs @@ -53,7 +53,20 @@ namespace Ice { foreach(PluginInfo p in _plugins) { - p.plugin.initialize(); + try + { + p.plugin.initialize(); + } + catch(PluginInitializationException ex) + { + throw ex; + } + catch(System.Exception ex) + { + PluginInitializationException e = new PluginInitializationException(ex); + e.reason = "plugin `" + p.name + "' initialization failed"; + throw e; + } initializedPlugins.Add(p.plugin); } } diff --git a/csharp/src/IceDiscovery/PluginI.cs b/csharp/src/IceDiscovery/PluginI.cs index ec846f016fd..69e3a6c0667 100644 --- a/csharp/src/IceDiscovery/PluginI.cs +++ b/csharp/src/IceDiscovery/PluginI.cs @@ -33,7 +33,7 @@ namespace IceDiscovery public void initialize() { Ice.Properties properties = _communicator.getProperties(); - + bool ipv4 = properties.getPropertyAsIntWithDefault("Ice.IPv4", 1) > 0; bool preferIPv6 = properties.getPropertyAsInt("Ice.PreferIPv6Address") > 0; string address; @@ -103,7 +103,7 @@ namespace IceDiscovery catch(Ice.LocalException ex) { StringBuilder b = new StringBuilder(); - b.Append("unable to establish multicast connection, IceDiscovery will be disabled:\n"); + b.Append("IceDiscovery is unable to establish a multicast connection:\n"); b.Append("proxy = "); b.Append(lookupPrx.ToString()); b.Append('\n'); @@ -127,7 +127,7 @@ namespace IceDiscovery loc = _locatorAdapter.addWithUUID( new LocatorI(lookup, Ice.LocatorRegistryPrxHelper.uncheckedCast(locatorRegistryPrx))); _communicator.setDefaultLocator(Ice.LocatorPrxHelper.uncheckedCast(loc)); - + _multicastAdapter.activate(); _replyAdapter.activate(); _locatorAdapter.activate(); diff --git a/csharp/src/IceLocatorDiscovery/PluginI.cs b/csharp/src/IceLocatorDiscovery/PluginI.cs index ed000dc0d6c..f349eaa560c 100644 --- a/csharp/src/IceLocatorDiscovery/PluginI.cs +++ b/csharp/src/IceLocatorDiscovery/PluginI.cs @@ -25,9 +25,9 @@ namespace IceLocatorDiscovery internal class Request { - public Request(LocatorI locator, - string operation, - Ice.OperationMode mode, + public Request(LocatorI locator, + string operation, + Ice.OperationMode mode, byte[] inParams, Dictionary<string, string> context, Ice.AMD_Object_ice_invoke amdCB) @@ -83,19 +83,19 @@ namespace IceLocatorDiscovery internal class VoidLocatorI : Ice.LocatorDisp_ { - public override void + public override void findObjectById_async(Ice.AMD_Locator_findObjectById amdCB, Ice.Identity id, Ice.Current current) { amdCB.ice_response(null); } - - public override void + + public override void findAdapterById_async(Ice.AMD_Locator_findAdapterById amdCB, String id, Ice.Current current) { amdCB.ice_response(null); } - - public override Ice.LocatorRegistryPrx + + public override Ice.LocatorRegistryPrx getRegistry(Ice.Current current) { return null; @@ -383,7 +383,7 @@ namespace IceLocatorDiscovery catch (Ice.LocalException ex) { System.Text.StringBuilder s = new System.Text.StringBuilder(); - s.Append("unable to establish multicast connection, Ice locator discovery will be disabled:\n"); + s.Append("IceLocatorDiscovery is unable to establish a multicast connection:\n"); s.Append("proxy = "); s.Append(lookupPrx.ToString()); s.Append("\n"); @@ -392,7 +392,7 @@ namespace IceLocatorDiscovery } Ice.LocatorPrx voidLo = Ice.LocatorPrxHelper.uncheckedCast(_locatorAdapter.addWithUUID(new VoidLocatorI())); - + string instanceName = properties.getProperty("IceLocatorDiscovery.InstanceName"); Ice.Identity id = new Ice.Identity(); id.name = "Locator"; |